mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Toolbar: Show the Customize link on front end when using a block theme if any plugins use the Customizer.
In WordPress 5.9, when a block theme is being used, the `Appearance → Customize` admin menu item is not present unless a plugin uses the Customizer. The Customize admin bar node should be shown on the front end if any plugins are using the Customizer, even if the current theme is a block theme. This commit mirrors a similar check in the admin menu to determine if the Customize link should be displayed. Follow-up to [52069], [52134], [52158], [52178]. Props pbiron, audrasjb, sabernhardt, costdev. Fixes #54683. git-svn-id: https://develop.svn.wordpress.org/trunk@52414 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -446,8 +446,8 @@ function wp_admin_bar_edit_site_menu( $wp_admin_bar ) {
|
||||
function wp_admin_bar_customize_menu( $wp_admin_bar ) {
|
||||
global $wp_customize;
|
||||
|
||||
// Don't show if a block theme is activated.
|
||||
if ( wp_is_block_theme() ) {
|
||||
// Don't show if a block theme is activated and no plugins use the customizer.
|
||||
if ( wp_is_block_theme() && ! has_action( 'customize_register' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user