Make WordPress Core


Ignore:
Timestamp:
05/25/2012 10:26:00 PM (14 years ago)
Author:
koopersmith
Message:

Hide 'Customize' toolbar item when customizer is not supported. fixes #20751, see #19910.

Removes script queue check for 'customize-loader' from wp_customize_support_script(), because we may want to check for customize-support on a page without the loader.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/admin-bar.php

    r20666 r20918  
    577577                return;
    578578
    579         $wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'customize', 'title' => __('Customize'), 'href' => wp_customize_url(get_stylesheet()) ) );
     579        $wp_admin_bar->add_menu( array(
     580                'parent' => 'appearance',
     581                'id'     => 'customize',
     582                'title'  => __('Customize'),
     583                'href'   => wp_customize_url(get_stylesheet()),
     584                'meta'   => array(
     585                        'class' => 'hide-if-no-customize',
     586                ),
     587        ) );
     588        add_action( 'wp_before_admin_bar_render', 'wp_customize_support_script' );
    580589
    581590        if ( current_theme_supports( 'widgets' )  )
Note: See TracChangeset for help on using the changeset viewer.