Skip to content

Commit

Permalink
Switch to stable external schemas.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbillion committed Aug 11, 2024
1 parent 1e0548f commit a4d2e40
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
3 changes: 3 additions & 0 deletions tests/mu-plugins/mu-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
) );
} );

$composer = json_decode( file_get_contents( dirname( __DIR__, 2 ) . '/composer.json' ), true );
define( 'WP_VERSION', $composer['require-dev']['roots/wordpress-full'] );

add_action( 'init', function() : void {
// Ensure we're authenticated as an admin during test data generation.
grant_super_admin( 1 );
Expand Down
7 changes: 6 additions & 1 deletion tests/output/font-collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
$data,
], 'font-collections' );

$url = sprintf(
'https://raw.githubusercontent.com/WordPress/gutenberg/wp/%s/schemas/json/font-collection.json',
WP_VERSION,
);

save_external_schema(
'https://schemas.wp.org/trunk/font-collection.json',
$url,
'font-collection'
);
7 changes: 6 additions & 1 deletion tests/output/fonts.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,13 @@
$data,
], 'font-faces' );

$url = sprintf(
'https://raw.githubusercontent.com/WordPress/gutenberg/wp/%s/schemas/json/theme.json',
WP_VERSION,
);

save_external_schema(
'https://schemas.wp.org/trunk/theme.json',
$url,
'font-face',
[
'definitions',
Expand Down

0 comments on commit a4d2e40

Please sign in to comment.