|
@@ 784-791 (lines=8) @@
|
| 781 |
|
function wp_admin_bar_appearance_menu( $wp_admin_bar ) { |
| 782 |
|
$wp_admin_bar->add_group( array( 'parent' => 'site-name', 'id' => 'appearance' ) ); |
| 783 |
|
|
| 784 |
|
if ( current_user_can( 'switch_themes' ) ) { |
| 785 |
|
$wp_admin_bar->add_menu( array( |
| 786 |
|
'parent' => 'appearance', |
| 787 |
|
'id' => 'themes', |
| 788 |
|
'title' => __( 'Themes' ), |
| 789 |
|
'href' => admin_url( 'themes.php' ), |
| 790 |
|
) ); |
| 791 |
|
} |
| 792 |
|
|
| 793 |
|
if ( ! current_user_can( 'edit_theme_options' ) ) { |
| 794 |
|
return; |
|
@@ 797-804 (lines=8) @@
|
| 794 |
|
return; |
| 795 |
|
} |
| 796 |
|
|
| 797 |
|
if ( current_theme_supports( 'widgets' ) ) { |
| 798 |
|
$wp_admin_bar->add_menu( array( |
| 799 |
|
'parent' => 'appearance', |
| 800 |
|
'id' => 'widgets', |
| 801 |
|
'title' => __( 'Widgets' ), |
| 802 |
|
'href' => admin_url( 'widgets.php' ), |
| 803 |
|
) ); |
| 804 |
|
} |
| 805 |
|
|
| 806 |
|
if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) |
| 807 |
|
$wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'menus', 'title' => __('Menus'), 'href' => admin_url('nav-menus.php') ) ); |
|
@@ 806-807 (lines=2) @@
|
| 803 |
|
) ); |
| 804 |
|
} |
| 805 |
|
|
| 806 |
|
if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) |
| 807 |
|
$wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'menus', 'title' => __('Menus'), 'href' => admin_url('nav-menus.php') ) ); |
| 808 |
|
|
| 809 |
|
if ( current_theme_supports( 'custom-background' ) ) { |
| 810 |
|
$wp_admin_bar->add_menu( array( |