diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php index d1099e92f9..966e5d9fad 100644 --- a/wp-admin/includes/ms.php +++ b/wp-admin/includes/ms.php @@ -660,20 +660,6 @@ function secret_salt_warning() { } add_action( 'admin_notices', 'secret_salt_warning' ); -function profile_update_primary_blog() { - global $current_user; - - $blogs = get_blogs_of_user( $current_user->id ); - if ( isset( $blogs[ $_POST[ 'primary_blog' ] ] ) == false ) { - return false; - } - - if ( isset( $_POST['primary_blog'] ) ) { - update_user_option( $current_user->id, 'primary_blog', (int) $_POST['primary_blog'], true ); - } -} -add_action ( 'myblogs_update', 'profile_update_primary_blog' ); - function admin_notice_feed() { global $current_user; if ( substr( $_SERVER[ 'PHP_SELF' ], -19 ) != '/wp-admin/index.php' ) @@ -815,101 +801,11 @@ function choose_primary_blog() { ID ); - if ( !$blogs || ( is_array( $blogs ) && empty( $blogs ) ) ) { - wp_die( __( 'You must be a member of at least one blog to use this page.' ) ); - } - - if ( empty($title) ) - $title = apply_filters( 'my_blogs_title', __( 'My Blogs' ) ); - ?> -
- -

- - -

-
- "; - } - reset( $blogs ); - $num = count( $blogs ); - $cols = 1; - if ( $num >= 20 ) { - $cols = 4; - } elseif ( $num >= 10 ) { - $cols = 2; - } - $num_rows = ceil($num/$cols); - $split = 0; - for( $i = 1; $i <= $num_rows; $i++ ) { - $rows[] = array_slice( $blogs, $split, $cols ); - $split = $split + $cols; - } - - foreach( $rows as $row ) { - $c = $c == "alternate" ? "" : "alternate"; - echo ""; - foreach( $row as $user_blog ) { - $t = $t == "border-right: 1px solid #ccc;" ? "" : "border-right: 1px solid #ccc;"; - echo ""; - } - echo ""; - }?> -

" . __( 'Global Settings' ) . "

"; - echo $settings_html; - echo "
"; - echo "

{$user_blog->blogname}

"; - echo "

" . apply_filters( "myblogs_blog_actions", "" . __( 'Visit' ) . " | " . __( 'Dashboard' ) . "", $user_blog ) . "

"; - echo apply_filters( 'myblogs_options', '', $user_blog ); - echo "
- -

- -

-
-
- ID ); - if ( $all_blogs != false && !empty( $all_blogs ) ) { - $title = apply_filters( 'my_blogs_title', __( 'My Blogs' ) ); - add_submenu_page( 'index.php', $title, $title, 'read', 'myblogs', 'blogs_listing' ); - } -} -add_action('admin_menu', 'blogs_page_init'); - function stripslashes_from_options( $blog_id ) { global $wpdb; diff --git a/wp-admin/menu.php b/wp-admin/menu.php index bf56359436..90cb20ff23 100644 --- a/wp-admin/menu.php +++ b/wp-admin/menu.php @@ -26,6 +26,10 @@ $awaiting_mod = wp_count_comments(); $awaiting_mod = $awaiting_mod->moderated; $menu[0] = array( __('Dashboard'), 'read', 'index.php', '', 'menu-top', 'menu-dashboard', 'div' ); +if ( is_multisite() ) { + $submenu[ 'index.php' ][0] = array( __('Dashboard'), 'read', 'index.php' ); + $submenu[ 'index.php' ][5] = array( __('My Sites'), 'read', 'my-sites.php' ); +} if ( is_multisite() && is_super_admin() ) { $menu[1] = array( '', 'read', 'separator0', '', 'wp-menu-separator' );