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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user