Skip to content

Commit 5c3c625

Browse files
committed
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. git-svn-id: https://develop.svn.wordpress.org/trunk@56268 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 6049e1f commit 5c3c625

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-revisions-controller.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ class WP_REST_Global_Styles_Revisions_Controller extends WP_REST_Controller {
2121
* @since 6.3.0
2222
* @var string
2323
*/
24-
private $parent_post_type;
24+
protected $parent_post_type;
2525

2626
/**
2727
* The base of the parent controller's route.
2828
*
2929
* @since 6.3.0
3030
* @var string
3131
*/
32-
private $parent_base;
32+
protected $parent_base;
3333

3434
/**
3535
* Constructor.
@@ -102,7 +102,7 @@ public function get_collection_params() {
102102
* @param string $raw_json Encoded JSON from global styles custom post content.
103103
* @return Array|WP_Error
104104
*/
105-
private function get_decoded_global_styles_json( $raw_json ) {
105+
protected function get_decoded_global_styles_json( $raw_json ) {
106106
$decoded_json = json_decode( $raw_json, true );
107107

108108
if ( is_array( $decoded_json ) && isset( $decoded_json['isGlobalStylesUserThemeJSON'] ) && true === $decoded_json['isGlobalStylesUserThemeJSON'] ) {

0 commit comments

Comments
 (0)