Skip to content

Commit

Permalink
get_root_layout_rules: remove unnecessary call to sanitize_title (#53568
Browse files Browse the repository at this point in the history
)

The layout definitions have been updated to be static and defined by the code, so there is no need to sanitize them.
  • Loading branch information
oandregal authored Aug 14, 2023
1 parent 59a346d commit edc9cbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/class-wp-theme-json-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -1317,7 +1317,7 @@ protected function get_layout_styles( $block_metadata ) {
continue;
}

$class_name = sanitize_title( _wp_array_get( $layout_definition, array( 'className' ), false ) );
$class_name = _wp_array_get( $layout_definition, array( 'className' ), false );
$spacing_rules = _wp_array_get( $layout_definition, array( 'spacingStyles' ), array() );

if (
Expand Down Expand Up @@ -1374,7 +1374,7 @@ protected function get_layout_styles( $block_metadata ) {
) {
$valid_display_modes = array( 'block', 'flex', 'grid' );
foreach ( $layout_definitions as $layout_definition ) {
$class_name = sanitize_title( _wp_array_get( $layout_definition, array( 'className' ), false ) );
$class_name = _wp_array_get( $layout_definition, array( 'className' ), false );
$base_style_rules = _wp_array_get( $layout_definition, array( 'baseStyles' ), array() );

if (
Expand Down

0 comments on commit edc9cbc

Please sign in to comment.