Skip to content

Commit

Permalink
Editor: Fix version in WP_Theme_JSON_Resolver::get_block_data().
Browse files Browse the repository at this point in the history
Introduced during the WP 6.1 alpha cycle, this commit fixes the version number from `1` to `2`.

Follow-up to [54162].

Props oandregal.
See #56467.

git-svn-id: https://develop.svn.wordpress.org/trunk@54491 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
hellofromtonya committed Oct 11, 2022
1 parent c0b76c1 commit df88d0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wp-includes/class-wp-theme-json-resolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ public static function get_theme_data( $deprecated = array(), $options = array()
public static function get_block_data() {
$registry = WP_Block_Type_Registry::get_instance();
$blocks = $registry->get_all_registered();
$config = array( 'version' => 1 );
$config = array( 'version' => 2 );
foreach ( $blocks as $block_name => $block_type ) {
if ( isset( $block_type->supports['__experimentalStyle'] ) ) {
$config['styles']['blocks'][ $block_name ] = static::remove_json_comments( $block_type->supports['__experimentalStyle'] );
Expand Down

0 comments on commit df88d0d

Please sign in to comment.