mirror of
git://develop.git.wordpress.org/
synced 2025-04-26 23:22:25 +02:00
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. Reviewed by spacedmonkey. Merges [56268] to the 6.3 branch. Fixes #58846. git-svn-id: https://develop.svn.wordpress.org/branches/6.3@56275 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c0442243f3
commit
ce6fe08ff9
@ -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'] ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user