Skip to content

Commit

Permalink
Theme Export: Change the schema url (#40106)
Browse files Browse the repository at this point in the history
  • Loading branch information
scruffian committed Apr 6, 2022
1 parent 89c63cc commit 3f0db22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/compat/wordpress-6.0/block-template-utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ function gutenberg_generate_block_templates_export_file() {
// If a version is defined, add a schema.
if ( $theme_json_raw['version'] ) {
global $wp_version;
$theme_json_version = substr( $wp_version, 0, strpos( $wp_version, '-' ) );
$theme_json_version = 'wp/' . substr( $wp_version, 0, 3 );
if ( defined( 'IS_GUTENBERG_PLUGIN' ) ) {
$theme_json_version = 'trunk';
}
$schema = array( '$schema' => 'https://schemas.wp.org/wp/' . $theme_json_version . '/theme.json' );
$schema = array( '$schema' => 'https://schemas.wp.org/' . $theme_json_version . '/theme.json' );
$theme_json_raw = array_merge( $schema, $theme_json_raw );
}

Expand Down

0 comments on commit 3f0db22

Please sign in to comment.