Skip to content

Commit

Permalink
Rebase this PR on WordPress#2014 PR (because we've renamed the methods).
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-vlasenko committed Dec 6, 2021
1 parent e077335 commit e25f91c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/wp-admin/includes/theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/class-wp-customize-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/ajax/CustomizeManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'] );
}
}
}

0 comments on commit e25f91c

Please sign in to comment.