X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/699231ae09f7057a4d0000cdf32e50a3df6a04ca..11be15bd505d66a91e2c80062190b13e315a04a9:/wp-includes/pluggable-deprecated.php diff --git a/wp-includes/pluggable-deprecated.php b/wp-includes/pluggable-deprecated.php index bb0e4f0e..02733b2b 100644 --- a/wp-includes/pluggable-deprecated.php +++ b/wp-includes/pluggable-deprecated.php @@ -36,6 +36,40 @@ function set_current_user($id, $name = '') { } endif; +if ( !function_exists('get_userdatabylogin') ) : +/** + * Retrieve user info by login name. + * + * @since 0.71 + * @deprecated 3.3.0 + * @deprecated Use get_user_by('login') + * + * @param string $user_login User's username + * @return bool|object False on failure, User DB row object + */ +function get_userdatabylogin($user_login) { + _deprecated_function( __FUNCTION__, '3.3', "get_user_by('login')" ); + return get_user_by('login', $user_login); +} +endif; + +if ( !function_exists('get_user_by_email') ) : +/** + * Retrieve user info by email. + * + * @since 2.5 + * @deprecated 3.3.0 + * @deprecated Use get_user_by('email') + * + * @param string $email User's email address + * @return bool|object False on failure, User DB row object + */ +function get_user_by_email($email) { + _deprecated_function( __FUNCTION__, '3.3', "get_user_by('email')" ); + return get_user_by('email', $email); +} +endif; + if ( !function_exists('wp_setcookie') ) : /** * Sets a cookie for a user who just logged in. This function is deprecated. @@ -54,7 +88,7 @@ if ( !function_exists('wp_setcookie') ) : */ function wp_setcookie($username, $password = '', $already_md5 = false, $home = '', $siteurl = '', $remember = false) { _deprecated_function( __FUNCTION__, '2.5', 'wp_set_auth_cookie()' ); - $user = get_userdatabylogin($username); + $user = get_user_by('login', $username); wp_set_auth_cookie($user->ID, $remember); } else : @@ -133,4 +167,26 @@ function wp_login($username, $password, $deprecated = '') { } else : _deprecated_function( 'wp_login', '2.5', 'wp_signon()' ); -endif; \ No newline at end of file +endif; + +/** + * WordPress AtomPub API implementation. + * + * Originally stored in wp-app.php, and later wp-includes/class-wp-atom-server.php. + * It is kept here in case a plugin directly referred to the class. + * + * @since 2.2.0 + * @deprecated 3.5.0 + * @link http://wordpress.org/plugins/atom-publishing-protocol/ + */ +if ( ! class_exists( 'wp_atom_server' ) ) { + class wp_atom_server { + public function __call( $name, $arguments ) { + _deprecated_function( __CLASS__ . '::' . $name, '3.5', 'the Atom Publishing Protocol plugin' ); + } + + public static function __callStatic( $name, $arguments ) { + _deprecated_function( __CLASS__ . '::' . $name, '3.5', 'the Atom Publishing Protocol plugin' ); + } + } +} \ No newline at end of file