Skip to content

Commit

Permalink
Ensure isGlobalStylesUserThemeJSON is set for migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
ajlende committed Apr 17, 2024
1 parent 930f297 commit ec14150
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/class-wp-theme-json-resolver-gutenberg.php
Expand Up @@ -554,8 +554,12 @@ public static function get_user_data() {
}

/** This filter is documented in wp-includes/class-wp-theme-json-resolver.php */
$theme_json = apply_filters( 'wp_theme_json_data_user', new WP_Theme_JSON_Data_Gutenberg( $config, 'custom' ) );
$config = $theme_json->get_data();
$theme_json = apply_filters( 'wp_theme_json_data_user', new WP_Theme_JSON_Data_Gutenberg( $config, 'custom' ) );
$config = $theme_json->get_data();

// Needs to be set for schema migrations of user data.
$config['isGlobalStylesUserThemeJSON'] = true;

static::$user = new WP_Theme_JSON_Gutenberg( $config, 'custom' );

return static::$user;
Expand Down

0 comments on commit ec14150

Please sign in to comment.