X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/699231ae09f7057a4d0000cdf32e50a3df6a04ca..7f1521bf193b382565eb753043c161f4cb3fcda7:/wp-includes/ms-deprecated.php diff --git a/wp-includes/ms-deprecated.php b/wp-includes/ms-deprecated.php index b6073628..beae326f 100644 --- a/wp-includes/ms-deprecated.php +++ b/wp-includes/ms-deprecated.php @@ -14,7 +14,24 @@ */ /** - * @since unknown + * Get the "dashboard blog", the blog where users without a blog edit their profile data. + * Dashboard blog functionality was removed in WordPress 3.1, replaced by the user admin. + * + * @since MU + * @deprecated 3.1.0 + * @see get_blog_details() + * @return int + */ +function get_dashboard_blog() { + _deprecated_function( __FUNCTION__, '3.1' ); + if ( $blog = get_site_option( 'dashboard_blog' ) ) + return get_blog_details( $blog ); + + return get_blog_details( $GLOBALS['current_site']->blog_id ); +} + +/** + * @since MU * @deprecated 3.0.0 * @deprecated Use wp_generate_password() * @see wp_generate_password() @@ -48,10 +65,10 @@ function is_site_admin( $user_login = '' ) { if ( !$user_id ) return false; } else { - $user = new WP_User( null, $user_login) ; - if ( empty( $user->id ) ) + $user = get_user_by( 'login', $user_login ); + if ( ! $user->exists() ) return false; - $user_id = $user->id; + $user_id = $user->ID; } return is_super_admin( $user_id ); @@ -68,8 +85,8 @@ function graceful_fail( $message ) { _deprecated_function( __FUNCTION__, '3.0', 'wp_die()' ); $message = apply_filters( 'graceful_fail', $message ); $message_template = apply_filters( 'graceful_fail_template', -' - +' + Error!