Skip to content

Commit ec14150

Browse files
committed
Ensure isGlobalStylesUserThemeJSON is set for migrations
1 parent 930f297 commit ec14150

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/class-wp-theme-json-resolver-gutenberg.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,8 +554,12 @@ public static function get_user_data() {
554554
}
555555

556556
/** This filter is documented in wp-includes/class-wp-theme-json-resolver.php */
557-
$theme_json = apply_filters( 'wp_theme_json_data_user', new WP_Theme_JSON_Data_Gutenberg( $config, 'custom' ) );
558-
$config = $theme_json->get_data();
557+
$theme_json = apply_filters( 'wp_theme_json_data_user', new WP_Theme_JSON_Data_Gutenberg( $config, 'custom' ) );
558+
$config = $theme_json->get_data();
559+
560+
// Needs to be set for schema migrations of user data.
561+
$config['isGlobalStylesUserThemeJSON'] = true;
562+
559563
static::$user = new WP_Theme_JSON_Gutenberg( $config, 'custom' );
560564

561565
return static::$user;

0 commit comments

Comments
 (0)