-
- if ( current_user_can( 'customize' ) ) {
- $wp_admin_bar->add_menu( array(
- 'parent' => 'appearance',
- 'id' => 'customize-themes',
- 'title' => __( 'Themes' ),
- 'href' => add_query_arg( urlencode( 'autofocus[section]' ), 'themes', $customize_url ), // urlencode() needed due to #16859
- 'meta' => array(
- 'class' => 'hide-if-no-customize',
- ),
- ) );
- }
- }
-
- if ( current_user_can( 'customize' ) ) {
- $wp_admin_bar->add_menu( array(
- 'parent' => 'appearance',
- 'id' => 'customize',
- 'title' => __('Customize'),
- 'href' => $customize_url,
- 'meta' => array(
- 'class' => 'hide-if-no-customize',
- ),
- ) );
- add_action( 'wp_before_admin_bar_render', 'wp_customize_support_script' );