Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/class-wp-theme-json-resolver-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public static function get_fields_to_translate() {
protected static function translate( $theme_json, $domain = 'default' ) {
if ( null === static::$i18n_schema ) {
$i18n_schema = wp_json_file_decode( __DIR__ . '/theme-i18n.json' );
static::$i18n_schema = null === $i18n_schema ? array() : $i18n_schema;
static::$i18n_schema = $i18n_schema ?? array();
Comment thread
westonruter marked this conversation as resolved.
Resolved
}

return translate_settings_using_i18n_schema( static::$i18n_schema, $theme_json, $domain );
Expand Down
5 changes: 1 addition & 4 deletions lib/experimental/script-modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,7 @@ function gutenberg_register_view_module_ids_rest_field() {
array(
'get_callback' => function ( $item ) {
$block_type = WP_Block_Type_Registry::get_instance()->get_registered( $item['name'] );
if ( isset( $block_type->view_script_module_ids ) ) {
return $block_type->view_script_module_ids;
}
return array();
return $block_type->view_script_module_ids ?? array();
},
)
);
Expand Down
Loading