Don't show Suspend/Unsuspend links for the main site on the admin bar. Props ocean90. fixes #15669
git-svn-id: https://develop.svn.wordpress.org/trunk@16781 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a53a2f0f04
commit
3bfa8b9e10
|
@ -33,14 +33,16 @@ function wp_admin_bar_superadmin_settings_menu() {
|
|||
$current_blog->domain
|
||||
);
|
||||
|
||||
$mature_url = network_admin_url( "edit.php?action=confirm&action2={$matureaction}&id={$current_blog->blog_id}&msg=" . urlencode( $maturetext_confirm ) );
|
||||
$suspend_url = network_admin_url( "edit.php?action=confirm&action2={$suspendaction}&id={$current_blog->blog_id}&msg=" . urlencode( $suspendtext_confirm ) );
|
||||
$mature_url = wp_nonce_url( network_admin_url( "edit.php?action=confirm&action2={$matureaction}&id={$current_blog->blog_id}&msg=" . urlencode( $maturetext_confirm ) ), 'confirm' );
|
||||
$suspend_url = wp_nonce_url( network_admin_url( "edit.php?action=confirm&action2={$suspendaction}&id={$current_blog->blog_id}&msg=" . urlencode( $suspendtext_confirm ) ), 'confirm' );
|
||||
|
||||
/* Add the submenu items to the Super Admin menu */
|
||||
$wp_admin_bar->add_menu( array( 'parent' => 'superadmin', 'title' => __( 'Network Admin' ), 'href' => network_admin_url(), 'position' => 5, ) );
|
||||
$wp_admin_bar->add_menu( array( 'parent' => 'superadmin', 'title' => __( 'Site Admin' ), 'href' => admin_url(), 'position' => 10, ) );
|
||||
$wp_admin_bar->add_menu( array( 'parent' => 'superadmin', 'title' => __( 'Site Options' ), 'href' => network_admin_url( "site-info.php?id={$current_blog->blog_id}" ), 'position' => 30, ) );
|
||||
$wp_admin_bar->add_menu( array( 'parent' => 'superadmin', 'title' => ( $current_blog->mature ? __('Unmark as mature') : __('Mark as mature') ), 'href' => $mature_url, 'position' => 50, ) );
|
||||
|
||||
if ( ! is_main_site( $current_blog->blog_id ) )
|
||||
$wp_admin_bar->add_menu( array( 'parent' => 'superadmin', 'title' => ( $current_blog->spam ? __('Unsuspend site') : __('Suspend site') ), 'href' => $suspend_url, 'position' => 80, ) );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue