Hide Customize from admin bar when using a block theme

Don't add the Customize link to the admin bar when a block theme is activated.

See #54337.

Built from https://develop.svn.wordpress.org/trunk@52134


git-svn-id: http://core.svn.wordpress.org/trunk@51726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
noisysocks 2021-11-11 04:47:02 +00:00
parent 449f1bb07a
commit ad15f6422f
2 changed files with 6 additions and 1 deletions

View File

@ -431,6 +431,11 @@ function wp_admin_bar_customize_menu( $wp_admin_bar ) {
return;
}
// Don't show if a block theme is activated.
if ( wp_is_block_template_theme() ) {
return;
}
$current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
if ( is_customize_preview() && $wp_customize->changeset_uuid() ) {
$current_url = remove_query_arg( 'customize_changeset_uuid', $current_url );

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.9-alpha-52133';
$wp_version = '5.9-alpha-52134';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.