X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/f9001779751f83dc8a10e478bfecb4d8dd5f964c..refs/tags/wordpress-4.5:/wp-includes/ms-deprecated.php diff --git a/wp-includes/ms-deprecated.php b/wp-includes/ms-deprecated.php index a7f7eb23..19224d78 100644 --- a/wp-includes/ms-deprecated.php +++ b/wp-includes/ms-deprecated.php @@ -14,10 +14,31 @@ */ /** + * 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.0.0 - * @deprecated Use wp_generate_password() + * @deprecated 3.1.0 Use get_blog_details() + * @see get_blog_details() + * + * @return int Current site ID. + */ +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 ); +} + +/** + * Generates a random password. + * + * @since MU + * @deprecated 3.0.0 Use wp_generate_password() * @see wp_generate_password() + * + * @param int $len Optional. The length of password to generate. Default 8. */ function generate_random_password( $len = 8 ) { _deprecated_function( __FUNCTION__, '3.0', 'wp_generate_password()' ); @@ -34,11 +55,10 @@ function generate_random_password( $len = 8 ) { * legacy function_exists() checks to determine if multisite is enabled. * * @since MU - * @deprecated 3.0.0 - * @deprecated Use is_super_admin() + * @deprecated 3.0.0 Use is_super_admin() * @see is_super_admin() - * @see is_multisite() * + * @param string $user_login Optional. Username for the user to check. Default empty. */ function is_site_admin( $user_login = '' ) { _deprecated_function( __FUNCTION__, '3.0', 'is_super_admin()' ); @@ -49,7 +69,7 @@ function is_site_admin( $user_login = '' ) { return false; } else { $user = get_user_by( 'login', $user_login ); - if ( empty( $user->ID ) ) + if ( ! $user->exists() ) return false; $user_id = $user->ID; } @@ -59,17 +79,18 @@ function is_site_admin( $user_login = '' ) { if ( !function_exists( 'graceful_fail' ) ) : /** + * Deprecated functionality to gracefully fail. + * * @since MU - * @deprecated 3.0.0 - * @deprecated Use wp_die() + * @deprecated 3.0.0 Use wp_die() * @see wp_die() */ 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!