| 663 | | if ( current_theme_supports( 'widgets' ) ) |
| 664 | | $wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'widgets', 'title' => __('Widgets'), 'href' => admin_url('widgets.php') ) ); |
| | 663 | if ( current_theme_supports( 'widgets' ) ) { |
| | 664 | $wp_admin_bar->add_menu( array( |
| | 665 | 'parent' => 'appearance', |
| | 666 | 'id' => 'widgets', |
| | 667 | 'title' => __('Widgets'), |
| | 668 | 'href' => admin_url('widgets.php'), |
| | 669 | 'meta' => array( |
| | 670 | 'class' => 'hide-if-customize', |
| | 671 | ), |
| | 672 | ) ); |
| 666 | | if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) |
| 667 | | $wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'menus', 'title' => __('Menus'), 'href' => admin_url('nav-menus.php') ) ); |
| | 674 | $wp_admin_bar->add_menu( array( |
| | 675 | 'parent' => 'appearance', |
| | 676 | 'id' => 'widget-customizer', |
| | 677 | 'title' => __('Widgets'), |
| | 678 | 'href' => add_query_arg( array( |
| | 679 | 'url' => urlencode( $current_url ), |
| | 680 | 'widget-customizer' => 'open', |
| | 681 | ), wp_customize_url() ), |
| | 682 | 'meta' => array( |
| | 683 | 'class' => 'hide-if-no-customize', |
| | 684 | ), |
| | 685 | ) ); |
| | 686 | } |
| 669 | | if ( current_theme_supports( 'custom-background' ) ) |
| 670 | | $wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'background', 'title' => __('Background'), 'href' => admin_url('themes.php?page=custom-background') ) ); |
| | 688 | if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) { |
| | 689 | $wp_admin_bar->add_menu( array( |
| | 690 | 'parent' => 'appearance', |
| | 691 | 'id' => 'menus', |
| | 692 | 'title' => __('Menus'), |
| | 693 | 'href' => admin_url('nav-menus.php'), |
| | 694 | ) ); |
| | 695 | } |
| 672 | | if ( current_theme_supports( 'custom-header' ) ) |
| 673 | | $wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'header', 'title' => __('Header'), 'href' => admin_url('themes.php?page=custom-header') ) ); |
| | 697 | if ( current_theme_supports( 'custom-background' ) ) { |
| | 698 | $wp_admin_bar->add_menu( array( |
| | 699 | 'parent' => 'appearance', |
| | 700 | 'id' => 'background', |
| | 701 | 'title' => __('Background'), |
| | 702 | 'href' => admin_url('themes.php?page=custom-background'), |
| | 703 | ) ); |
| | 704 | } |
| | 705 | |
| | 706 | if ( current_theme_supports( 'custom-header' ) ) { |
| | 707 | $wp_admin_bar->add_menu( array( |
| | 708 | 'parent' => 'appearance', |
| | 709 | 'id' => 'header', |
| | 710 | 'title' => __('Header'), |
| | 711 | 'href' => admin_url('themes.php?page=custom-header'), |
| | 712 | ) ); |
| | 713 | } |