From b5ec7315789225dc82cb7466b9c551f19918428c Mon Sep 17 00:00:00 2001 From: audrasjb Date: Wed, 19 Jul 2023 07:49:24 +0000 Subject: [PATCH] REST API: Update Global styles revisions private methods to protected. This changeset updates the private vars and methods in the Global styles revisions rest API controller to be protected, so class entities that inherit from the base can use them, and to allow iterating on 6.3 features without having to copy over private methods to new classes. Props ramonopoly. Fixes #58846. Built from https://develop.svn.wordpress.org/trunk@56268 git-svn-id: http://core.svn.wordpress.org/trunk@55780 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../class-wp-rest-global-styles-revisions-controller.php | 6 +++--- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-revisions-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-revisions-controller.php index 20457ee9ac..930d4ca321 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-revisions-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-revisions-controller.php @@ -21,7 +21,7 @@ class WP_REST_Global_Styles_Revisions_Controller extends WP_REST_Controller { * @since 6.3.0 * @var string */ - private $parent_post_type; + protected $parent_post_type; /** * The base of the parent controller's route. @@ -29,7 +29,7 @@ class WP_REST_Global_Styles_Revisions_Controller extends WP_REST_Controller { * @since 6.3.0 * @var string */ - private $parent_base; + protected $parent_base; /** * Constructor. @@ -102,7 +102,7 @@ class WP_REST_Global_Styles_Revisions_Controller extends WP_REST_Controller { * @param string $raw_json Encoded JSON from global styles custom post content. * @return Array|WP_Error */ - private function get_decoded_global_styles_json( $raw_json ) { + protected function get_decoded_global_styles_json( $raw_json ) { $decoded_json = json_decode( $raw_json, true ); if ( is_array( $decoded_json ) && isset( $decoded_json['isGlobalStylesUserThemeJSON'] ) && true === $decoded_json['isGlobalStylesUserThemeJSON'] ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 546002ed1b..dc12cb42ac 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4-alpha-56267'; +$wp_version = '6.4-alpha-56268'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.