Skip to content

Commit

Permalink
compat/6.1: add missing backport for constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Dec 15, 2022
1 parent 49438da commit 62e8eda
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/compat/wordpress-6.2/class-wp-theme-json-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,8 @@ public function __construct( $theme_json = array(), $origin = 'theme' ) {
}

$this->theme_json = WP_Theme_JSON_Schema::migrate( $theme_json );
$valid_block_names = array_keys( static::get_blocks_metadata() );
$registry = WP_Block_Type_Registry::get_instance();
$valid_block_names = array_keys( $registry->get_all_registered() );
$valid_element_names = array_keys( static::ELEMENTS );
$theme_json = static::sanitize( $this->theme_json, $valid_block_names, $valid_element_names );
$this->theme_json = static::maybe_opt_in_into_settings( $theme_json );
Expand Down

0 comments on commit 62e8eda

Please sign in to comment.