X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/699231ae09f7057a4d0000cdf32e50a3df6a04ca..ebf9bbbbf2dbd59c653bbec4ed90d2947a95b9e7:/wp-admin/includes/ms.php diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php index ae23b7f8..84585264 100644 --- a/wp-admin/includes/ms.php +++ b/wp-admin/includes/ms.php @@ -65,12 +65,12 @@ function wpmu_delete_blog( $blog_id, $drop = false ) { do_action( 'delete_blog', $blog_id, $drop ); - $users = get_users_of_blog( $blog_id ); + $users = get_users( array( 'blog_id' => $blog_id, 'fields' => 'ids' ) ); // Remove users from this blog. if ( ! empty( $users ) ) { - foreach ( $users as $user ) { - remove_user_from_blog( $user->user_id, $blog_id) ; + foreach ( $users as $user_id ) { + remove_user_from_blog( $user_id, $blog_id) ; } } @@ -177,72 +177,6 @@ function wpmu_delete_user( $id ) { return true; } -function confirm_delete_users( $users ) { - global $current_user; - if ( !is_array( $users ) ) - return false; - - screen_icon(); - ?> -
- - - ID . '_new_email' ) ) + if ( strpos( $_SERVER['PHP_SELF'], 'profile.php' ) && isset( $_GET['updated'] ) && $email = get_option( get_current_user_id() . '_new_email' ) ) echo "%2$sMB' ), esc_url( admin_url( 'upload.php' ) ), $quota ); ?> | -- |
%2$sMB (%3$s%%)' ), esc_url( admin_url( 'upload.php' ) ), $used, $percentused ); ?> | -- |
" . $content . "" . __( 'Read More' ) . " " . __( 'Dismiss' ) . "
"; - echo "
ID );
- $primary_blog = get_user_meta( $current_user->ID, 'primary_blog', true );
+ $all_blogs = get_blogs_of_user( get_current_user_id() );
+ $primary_blog = get_user_meta( get_current_user_id(), 'primary_blog', true );
if ( count( $all_blogs ) > 1 ) {
$found = false;
?>
@@ -783,13 +633,13 @@ function choose_primary_blog() {
ID, 'primary_blog', $blog->userblog_id );
+ update_user_meta( get_current_user_id(), 'primary_blog', $blog->userblog_id );
}
} elseif ( count( $all_blogs ) == 1 ) {
$blog = array_shift( $all_blogs );
echo $blog->domain;
if ( $primary_blog != $blog->userblog_id ) // Set the primary blog again if it's out of sync with blog list.
- update_user_meta( $current_user->ID, 'primary_blog', $blog->userblog_id );
+ update_user_meta( get_current_user_id(), 'primary_blog', $blog->userblog_id );
} else {
echo "N/A";
}
@@ -807,16 +657,6 @@ function choose_primary_blog() {
" . sprintf( __( "Warning! The current theme supports Featured Images. You must enable image uploads on the options page for it to work." ), esc_url( admin_url( 'ms-options.php' ) ) ) . "";
- }
-}
-add_action( 'admin_notices', 'show_post_thumbnail_warning' );
-
function ms_deprecated_blogs_file() {
if ( ! is_super_admin() )
return;
@@ -824,24 +664,13 @@ function ms_deprecated_blogs_file() {
return;
echo ' ' . sprintf( __( 'The ';
}
-add_action( 'admin_notices', 'ms_deprecated_blogs_file' );
-
-/**
- * Outputs the notice message for multisite regarding activation of plugin page.
- *
- * @since 3.0.0
- * @return none
- */
-function _admin_notice_multisite_activate_plugins_page() {
- $message = sprintf( __( 'The plugins page is not visible to normal users. It must be activated first. %s' ), '' . __( 'Activate' ) . '' );
- echo "%1$s file is deprecated. Please remove it and update your server rewrite rules to use %2$s instead.' ), 'wp-content/blogs.php', 'wp-includes/ms-files.php' ) . '$message |