diff --git a/lib/compat/wordpress-5.9/class-wp-rest-global-styles-controller.php b/lib/compat/wordpress-5.9/class-wp-rest-global-styles-controller.php index 5e7be742b86db..e4171c7eb0872 100644 --- a/lib/compat/wordpress-5.9/class-wp-rest-global-styles-controller.php +++ b/lib/compat/wordpress-5.9/class-wp-rest-global-styles-controller.php @@ -277,7 +277,7 @@ protected function prepare_item_for_database( $request ) { $config['settings'] = $existing_config['settings']; } $config['isGlobalStylesUserThemeJSON'] = true; - $config['version'] = WP_Theme_JSON::LATEST_SCHEMA; + $config['version'] = WP_Theme_JSON_Gutenberg::LATEST_SCHEMA; $changes->post_content = wp_json_encode( $config ); } @@ -307,7 +307,7 @@ public function prepare_item_for_response( $post, $request ) { // phpcs:ignore V $is_global_styles_user_theme_json = isset( $raw_config['isGlobalStylesUserThemeJSON'] ) && true === $raw_config['isGlobalStylesUserThemeJSON']; $config = array(); if ( $is_global_styles_user_theme_json ) { - $config = ( new WP_Theme_JSON( $raw_config, 'custom' ) )->get_raw_data(); + $config = ( new WP_Theme_JSON_Gutenberg( $raw_config, 'custom' ) )->get_raw_data(); } // Base fields for every post. @@ -555,7 +555,7 @@ public function get_theme_item( $request ) { ); } - $theme = WP_Theme_JSON_Resolver::get_merged_data( 'theme' ); + $theme = WP_Theme_JSON_Resolver_Gutenberg::get_merged_data( 'theme' ); $data = array(); $fields = $this->get_fields_for_response( $request );