diff --git a/src/wp-admin/includes/theme.php b/src/wp-admin/includes/theme.php index af7fdbd236c33..d5c6a549ebbb6 100644 --- a/src/wp-admin/includes/theme.php +++ b/src/wp-admin/includes/theme.php @@ -782,7 +782,7 @@ function wp_prepare_themes_for_js( $themes = null ) { ? wp_nonce_url( admin_url( 'themes.php?action=' . $auto_update_action . '&stylesheet=' . $encoded_slug ), 'updates' ) : null, ), - 'block_based' => $theme->is_block_based(), + 'block_theme' => $theme->is_block_theme(), ); } diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php index 80676e5d9ad4e..dd59ab19c815d 100644 --- a/src/wp-includes/class-wp-customize-manager.php +++ b/src/wp-includes/class-wp-customize-manager.php @@ -5811,7 +5811,7 @@ public function handle_load_themes_request() { $themes = array( 'themes' => array() ); foreach ( wp_prepare_themes_for_js() as $theme ) { // Block-based themes should not be edited with Customizer. - if ( ! empty( $theme['block_based'] ) ) { + if ( ! empty( $theme['block_theme'] ) ) { continue; } $theme['type'] = 'installed'; diff --git a/tests/phpunit/tests/ajax/CustomizeManager.php b/tests/phpunit/tests/ajax/CustomizeManager.php index 7ee6dbc6e92ec..afa1a0cf5d45c 100644 --- a/tests/phpunit/tests/ajax/CustomizeManager.php +++ b/tests/phpunit/tests/ajax/CustomizeManager.php @@ -743,7 +743,7 @@ public function test_wp_ajax_customize_load_themes_action() { $this->assertNotEmpty( $theme['id'] ); $this->assertNotEmpty( $theme['name'] ); // It must only return non-block themes - $this->assertNotTrue( $theme['block_based'] ); + $this->assertNotTrue( $theme['block_theme'] ); } } }