[wp-trac] [WordPress Trac] #32671: Make Menus link in admin bar go to Customizer

WordPress Trac noreply at wordpress.org
Wed Jun 17 15:50:12 UTC 2015


#32671: Make Menus link in admin bar go to Customizer
----------------------------+----------------------------
 Reporter:  voldemortensen  |      Owner:
     Type:  enhancement     |     Status:  new
 Priority:  normal          |  Milestone:  4.3
Component:  Customize       |    Version:
 Severity:  normal          |   Keywords:  good-first-bug
  Focuses:                  |
----------------------------+----------------------------
 This needs to be consistent with other links in the admin bar.


 {{{
         if ( current_theme_supports( 'menus' ) || current_theme_supports(
 'widgets' ) )
                 $wp_admin_bar->add_menu( array(
                         'parent' => 'appearance',
                         'id'     => 'menus',
                         'title'  => __( 'Menus' ),
                         'href'   => admin_url( 'nav-menus.php' ),
                         'meta'   => array(
                                 'class' => 'hide-if-customize',
                         ),
                 ) );

                 if( current_user_can( 'customize' ) ) {
                         $wp_admin_bar->add_menu( array(
                                 'parent' => 'appearance',
                                 'id'     => 'menus',
                                 'title'  => __('Menus'),
                                 'href'   => add_query_arg( urlencode(
 'autofocus[panel]'), 'nav_menus', $customize_url ),
                                 'meta'   => array(
                                         'class' => 'hide-if-no-customize',
                                 ),
                         ) );
                 }
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32671>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list