]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/pluggable-deprecated.php
WordPress 3.5.1-scripts
[autoinstalls/wordpress.git] / wp-includes / pluggable-deprecated.php
index bb0e4f0eb04a053671d61f87ca1efc507bc8a105..69e78f5f9542c4467ffcec0ad57a0c65c504e6a1 100644 (file)
@@ -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/extend/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 Platform plugin' );
+               }
+
+               public static function __callStatic( $name, $arguments ) {
+                       _deprecated_function( __CLASS__ . '::' . $name, '3.5', 'the Atom Publishing Platform plugin' );
+               }
+       }
+}
\ No newline at end of file