From e1ac6c3fba4f5a080ed0e119b7df6061104b124d Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Wed, 10 Nov 2021 19:54:51 +0000 Subject: [PATCH] General: Minor fixes to Global Style related code. Follow up to [52041,52049-52052,52054,52106,52108-52110]. Props swisspidy, TobiasBg, spacedmonkey, kebbet, oandregal. See #54336. git-svn-id: https://develop.svn.wordpress.org/trunk@52128 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/kses.php | 2 ++ src/wp-includes/post.php | 5 ++--- src/wp-includes/rest-api.php | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/wp-includes/kses.php b/src/wp-includes/kses.php index 32df2c6406..2ee8aee5a0 100644 --- a/src/wp-includes/kses.php +++ b/src/wp-includes/kses.php @@ -2084,6 +2084,8 @@ function wp_filter_post_kses( $data ) { /** * Sanitizes global styles user content removing unsafe rules. * + * @since 5.9.0 + * * @param string $data Post content to filter. * @return string Filtered post content with unsafe rules removed. */ diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index 75963deb0b..3e2cdbc415 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -449,8 +449,8 @@ function create_initial_post_types() { register_post_type( 'wp_global_styles', array( - 'label' => __( 'Global Styles' ), - 'description' => __( 'Post type for storing user design tokens.' ), + 'label' => _x( 'Global Styles', 'post type general name' ), + 'description' => __( 'Global styles to include in themes.' ), 'public' => false, '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ 'show_ui' => false, @@ -499,7 +499,6 @@ function create_initial_post_types() { 'items_list_navigation' => __( 'Navigation Menus list navigation' ), 'items_list' => __( 'Navigation Menus list' ), ), - 'description' => __( 'Navigation menus.' ), 'public' => false, '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ 'has_archive' => false, diff --git a/src/wp-includes/rest-api.php b/src/wp-includes/rest-api.php index 4efb69dbf3..ba0f7a08de 100644 --- a/src/wp-includes/rest-api.php +++ b/src/wp-includes/rest-api.php @@ -294,7 +294,7 @@ function create_initial_rest_routes() { $controller->register_routes(); // Block Renderer. - $controller = new WP_REST_Block_Renderer_Controller; + $controller = new WP_REST_Block_Renderer_Controller(); $controller->register_routes(); // Block Types.