wp/wp-includes/pluggable-deprecated.php
changeset 5 5e2f62d02dcd
parent 0 d970ebf37754
child 7 cf61fcea0001
equal deleted inserted replaced
4:346c88efed21 5:5e2f62d02dcd
    26  * @deprecated 3.0.0
    26  * @deprecated 3.0.0
    27  * @deprecated Use wp_set_current_user()
    27  * @deprecated Use wp_set_current_user()
    28  *
    28  *
    29  * @param int|null $id User ID.
    29  * @param int|null $id User ID.
    30  * @param string $name Optional. The user's username
    30  * @param string $name Optional. The user's username
    31  * @return object returns wp_set_current_user()
    31  * @return WP_User returns wp_set_current_user()
    32  */
    32  */
    33 function set_current_user($id, $name = '') {
    33 function set_current_user($id, $name = '') {
    34 	_deprecated_function( __FUNCTION__, '3.0', 'wp_set_current_user()' );
    34 	_deprecated_function( __FUNCTION__, '3.0', 'wp_set_current_user()' );
    35 	return wp_set_current_user($id, $name);
    35 	return wp_set_current_user($id, $name);
    36 }
    36 }
    55 
    55 
    56 if ( !function_exists('get_user_by_email') ) :
    56 if ( !function_exists('get_user_by_email') ) :
    57 /**
    57 /**
    58  * Retrieve user info by email.
    58  * Retrieve user info by email.
    59  *
    59  *
    60  * @since 2.5
    60  * @since 2.5.0
    61  * @deprecated 3.3.0
    61  * @deprecated 3.3.0
    62  * @deprecated Use get_user_by('email')
    62  * @deprecated Use get_user_by('email')
    63  *
    63  *
    64  * @param string $email User's email address
    64  * @param string $email User's email address
    65  * @return bool|object False on failure, User DB row object
    65  * @return bool|object False on failure, User DB row object
    72 
    72 
    73 if ( !function_exists('wp_setcookie') ) :
    73 if ( !function_exists('wp_setcookie') ) :
    74 /**
    74 /**
    75  * Sets a cookie for a user who just logged in. This function is deprecated.
    75  * Sets a cookie for a user who just logged in. This function is deprecated.
    76  *
    76  *
    77  * @since 1.5
    77  * @since 1.5.0
    78  * @deprecated 2.5
    78  * @deprecated 2.5.0
    79  * @deprecated Use wp_set_auth_cookie()
    79  * @deprecated Use wp_set_auth_cookie()
    80  * @see wp_set_auth_cookie()
    80  * @see wp_set_auth_cookie()
    81  *
    81  *
    82  * @param string $username The user's username
    82  * @param string $username The user's username
    83  * @param string $password Optional. The user's password
    83  * @param string $password Optional. The user's password
    97 
    97 
    98 if ( !function_exists('wp_clearcookie') ) :
    98 if ( !function_exists('wp_clearcookie') ) :
    99 /**
    99 /**
   100  * Clears the authentication cookie, logging the user out. This function is deprecated.
   100  * Clears the authentication cookie, logging the user out. This function is deprecated.
   101  *
   101  *
   102  * @since 1.5
   102  * @since 1.5.0
   103  * @deprecated 2.5
   103  * @deprecated 2.5.0
   104  * @deprecated Use wp_clear_auth_cookie()
   104  * @deprecated Use wp_clear_auth_cookie()
   105  * @see wp_clear_auth_cookie()
   105  * @see wp_clear_auth_cookie()
   106  */
   106  */
   107 function wp_clearcookie() {
   107 function wp_clearcookie() {
   108 	_deprecated_function( __FUNCTION__, '2.5', 'wp_clear_auth_cookie()' );
   108 	_deprecated_function( __FUNCTION__, '2.5', 'wp_clear_auth_cookie()' );
   118  *
   118  *
   119  * This function is deprecated and should no longer be extended as it won't be
   119  * This function is deprecated and should no longer be extended as it won't be
   120  * used anywhere in WordPress. Also, plugins shouldn't use it either.
   120  * used anywhere in WordPress. Also, plugins shouldn't use it either.
   121  *
   121  *
   122  * @since 2.0.3
   122  * @since 2.0.3
   123  * @deprecated 2.5
   123  * @deprecated 2.5.0
   124  * @deprecated No alternative
   124  * @deprecated No alternative
   125  *
   125  *
   126  * @return bool Always returns false
   126  * @return bool Always returns false
   127  */
   127  */
   128 function wp_get_cookie_login() {
   128 function wp_get_cookie_login() {
   146  *
   146  *
   147  * @since 1.2.2
   147  * @since 1.2.2
   148  * @deprecated Use wp_signon()
   148  * @deprecated Use wp_signon()
   149  * @global string $error Error when false is returned
   149  * @global string $error Error when false is returned
   150  *
   150  *
   151  * @param string $username User's username
   151  * @param string $username   User's username
   152  * @param string $password User's password
   152  * @param string $password   User's password
   153  * @param bool $deprecated Not used
   153  * @param string $deprecated Not used
   154  * @return bool False on login failure, true on successful check
   154  * @return bool False on login failure, true on successful check
   155  */
   155  */
   156 function wp_login($username, $password, $deprecated = '') {
   156 function wp_login($username, $password, $deprecated = '') {
   157 	_deprecated_function( __FUNCTION__, '2.5', 'wp_signon()' );
   157 	_deprecated_function( __FUNCTION__, '2.5', 'wp_signon()' );
   158 	global $error;
   158 	global $error;
   175  * Originally stored in wp-app.php, and later wp-includes/class-wp-atom-server.php.
   175  * Originally stored in wp-app.php, and later wp-includes/class-wp-atom-server.php.
   176  * It is kept here in case a plugin directly referred to the class.
   176  * It is kept here in case a plugin directly referred to the class.
   177  *
   177  *
   178  * @since 2.2.0
   178  * @since 2.2.0
   179  * @deprecated 3.5.0
   179  * @deprecated 3.5.0
   180  * @link http://wordpress.org/plugins/atom-publishing-protocol/
   180  * @link https://wordpress.org/plugins/atom-publishing-protocol/
   181  */
   181  */
   182 if ( ! class_exists( 'wp_atom_server' ) ) {
   182 if ( ! class_exists( 'wp_atom_server' ) ) {
   183 	class wp_atom_server {
   183 	class wp_atom_server {
   184 		public function __call( $name, $arguments ) {
   184 		public function __call( $name, $arguments ) {
   185 			_deprecated_function( __CLASS__ . '::' . $name, '3.5', 'the Atom Publishing Protocol plugin' );
   185 			_deprecated_function( __CLASS__ . '::' . $name, '3.5', 'the Atom Publishing Protocol plugin' );