You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/compat/wordpress-6.2/class-gutenberg-rest-global-styles-controller-6-2.php
+51Lines changed: 51 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -201,4 +201,55 @@ private function validate_custom_css( $css ) {
201
201
}
202
202
returntrue;
203
203
}
204
+
205
+
/**
206
+
* Returns the given theme global styles config.
207
+
* Duplicated from core.
208
+
* The only change is that we call WP_Theme_JSON_Resolver_Gutenberg::get_merged_data( 'theme' ) instead of WP_Theme_JSON_Resolver::get_merged_data( 'theme' ).
209
+
*
210
+
* @since 6.2.0
211
+
*
212
+
* @param WP_REST_Request $request The request instance.
213
+
* @return WP_REST_Response|WP_Error
214
+
*/
215
+
publicfunctionget_theme_item( $request ) {
216
+
if ( get_stylesheet() !== $request['stylesheet'] ) {
217
+
// This endpoint only supports the active theme for now.
0 commit comments