From edc9cbce89b35eaba48ebae931de739cd4d96e3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= <583546+oandregal@users.noreply.github.com> Date: Mon, 14 Aug 2023 09:00:02 +0200 Subject: [PATCH] get_root_layout_rules: remove unnecessary call to sanitize_title (#53568) The layout definitions have been updated to be static and defined by the code, so there is no need to sanitize them. --- lib/class-wp-theme-json-gutenberg.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/class-wp-theme-json-gutenberg.php b/lib/class-wp-theme-json-gutenberg.php index 97b9c58b13df29..874edf492ee024 100644 --- a/lib/class-wp-theme-json-gutenberg.php +++ b/lib/class-wp-theme-json-gutenberg.php @@ -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 ( @@ -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 (