Edit File by line
/home/barbar84/public_h.../wp-inclu...
File: pluggable-deprecated.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Deprecated pluggable functions from past WordPress versions. You shouldn't use these
[2] Fix | Delete
* functions and look for the alternatives instead. The functions will be removed in a
[3] Fix | Delete
* later version.
[4] Fix | Delete
*
[5] Fix | Delete
* Deprecated warnings are also thrown if one of these functions is being defined by a plugin.
[6] Fix | Delete
*
[7] Fix | Delete
* @package WordPress
[8] Fix | Delete
* @subpackage Deprecated
[9] Fix | Delete
* @see pluggable.php
[10] Fix | Delete
*/
[11] Fix | Delete
[12] Fix | Delete
/*
[13] Fix | Delete
* Deprecated functions come here to die.
[14] Fix | Delete
*/
[15] Fix | Delete
[16] Fix | Delete
if ( !function_exists('set_current_user') ) :
[17] Fix | Delete
/**
[18] Fix | Delete
* Changes the current user by ID or name.
[19] Fix | Delete
*
[20] Fix | Delete
* Set $id to null and specify a name if you do not know a user's ID.
[21] Fix | Delete
*
[22] Fix | Delete
* @since 2.0.1
[23] Fix | Delete
* @deprecated 3.0.0 Use wp_set_current_user()
[24] Fix | Delete
* @see wp_set_current_user()
[25] Fix | Delete
*
[26] Fix | Delete
* @param int|null $id User ID.
[27] Fix | Delete
* @param string $name Optional. The user's username
[28] Fix | Delete
* @return WP_User returns wp_set_current_user()
[29] Fix | Delete
*/
[30] Fix | Delete
function set_current_user($id, $name = '') {
[31] Fix | Delete
_deprecated_function( __FUNCTION__, '3.0.0', 'wp_set_current_user()' );
[32] Fix | Delete
return wp_set_current_user($id, $name);
[33] Fix | Delete
}
[34] Fix | Delete
endif;
[35] Fix | Delete
[36] Fix | Delete
if ( !function_exists('get_currentuserinfo') ) :
[37] Fix | Delete
/**
[38] Fix | Delete
* Populate global variables with information about the currently logged in user.
[39] Fix | Delete
*
[40] Fix | Delete
* @since 0.71
[41] Fix | Delete
* @deprecated 4.5.0 Use wp_get_current_user()
[42] Fix | Delete
* @see wp_get_current_user()
[43] Fix | Delete
*
[44] Fix | Delete
* @return bool|WP_User False on XMLRPC Request and invalid auth cookie, WP_User instance otherwise.
[45] Fix | Delete
*/
[46] Fix | Delete
function get_currentuserinfo() {
[47] Fix | Delete
_deprecated_function( __FUNCTION__, '4.5.0', 'wp_get_current_user()' );
[48] Fix | Delete
[49] Fix | Delete
return _wp_get_current_user();
[50] Fix | Delete
}
[51] Fix | Delete
endif;
[52] Fix | Delete
[53] Fix | Delete
if ( !function_exists('get_userdatabylogin') ) :
[54] Fix | Delete
/**
[55] Fix | Delete
* Retrieve user info by login name.
[56] Fix | Delete
*
[57] Fix | Delete
* @since 0.71
[58] Fix | Delete
* @deprecated 3.3.0 Use get_user_by()
[59] Fix | Delete
* @see get_user_by()
[60] Fix | Delete
*
[61] Fix | Delete
* @param string $user_login User's username
[62] Fix | Delete
* @return bool|object False on failure, User DB row object
[63] Fix | Delete
*/
[64] Fix | Delete
function get_userdatabylogin($user_login) {
[65] Fix | Delete
_deprecated_function( __FUNCTION__, '3.3.0', "get_user_by('login')" );
[66] Fix | Delete
return get_user_by('login', $user_login);
[67] Fix | Delete
}
[68] Fix | Delete
endif;
[69] Fix | Delete
[70] Fix | Delete
if ( !function_exists('get_user_by_email') ) :
[71] Fix | Delete
/**
[72] Fix | Delete
* Retrieve user info by email.
[73] Fix | Delete
*
[74] Fix | Delete
* @since 2.5.0
[75] Fix | Delete
* @deprecated 3.3.0 Use get_user_by()
[76] Fix | Delete
* @see get_user_by()
[77] Fix | Delete
*
[78] Fix | Delete
* @param string $email User's email address
[79] Fix | Delete
* @return bool|object False on failure, User DB row object
[80] Fix | Delete
*/
[81] Fix | Delete
function get_user_by_email($email) {
[82] Fix | Delete
_deprecated_function( __FUNCTION__, '3.3.0', "get_user_by('email')" );
[83] Fix | Delete
return get_user_by('email', $email);
[84] Fix | Delete
}
[85] Fix | Delete
endif;
[86] Fix | Delete
[87] Fix | Delete
if ( !function_exists('wp_setcookie') ) :
[88] Fix | Delete
/**
[89] Fix | Delete
* Sets a cookie for a user who just logged in. This function is deprecated.
[90] Fix | Delete
*
[91] Fix | Delete
* @since 1.5.0
[92] Fix | Delete
* @deprecated 2.5.0 Use wp_set_auth_cookie()
[93] Fix | Delete
* @see wp_set_auth_cookie()
[94] Fix | Delete
*
[95] Fix | Delete
* @param string $username The user's username
[96] Fix | Delete
* @param string $password Optional. The user's password
[97] Fix | Delete
* @param bool $already_md5 Optional. Whether the password has already been through MD5
[98] Fix | Delete
* @param string $home Optional. Will be used instead of COOKIEPATH if set
[99] Fix | Delete
* @param string $siteurl Optional. Will be used instead of SITECOOKIEPATH if set
[100] Fix | Delete
* @param bool $remember Optional. Remember that the user is logged in
[101] Fix | Delete
*/
[102] Fix | Delete
function wp_setcookie($username, $password = '', $already_md5 = false, $home = '', $siteurl = '', $remember = false) {
[103] Fix | Delete
_deprecated_function( __FUNCTION__, '2.5.0', 'wp_set_auth_cookie()' );
[104] Fix | Delete
$user = get_user_by('login', $username);
[105] Fix | Delete
wp_set_auth_cookie($user->ID, $remember);
[106] Fix | Delete
}
[107] Fix | Delete
else :
[108] Fix | Delete
_deprecated_function( 'wp_setcookie', '2.5.0', 'wp_set_auth_cookie()' );
[109] Fix | Delete
endif;
[110] Fix | Delete
[111] Fix | Delete
if ( !function_exists('wp_clearcookie') ) :
[112] Fix | Delete
/**
[113] Fix | Delete
* Clears the authentication cookie, logging the user out. This function is deprecated.
[114] Fix | Delete
*
[115] Fix | Delete
* @since 1.5.0
[116] Fix | Delete
* @deprecated 2.5.0 Use wp_clear_auth_cookie()
[117] Fix | Delete
* @see wp_clear_auth_cookie()
[118] Fix | Delete
*/
[119] Fix | Delete
function wp_clearcookie() {
[120] Fix | Delete
_deprecated_function( __FUNCTION__, '2.5.0', 'wp_clear_auth_cookie()' );
[121] Fix | Delete
wp_clear_auth_cookie();
[122] Fix | Delete
}
[123] Fix | Delete
else :
[124] Fix | Delete
_deprecated_function( 'wp_clearcookie', '2.5.0', 'wp_clear_auth_cookie()' );
[125] Fix | Delete
endif;
[126] Fix | Delete
[127] Fix | Delete
if ( !function_exists('wp_get_cookie_login') ):
[128] Fix | Delete
/**
[129] Fix | Delete
* Gets the user cookie login. This function is deprecated.
[130] Fix | Delete
*
[131] Fix | Delete
* This function is deprecated and should no longer be extended as it won't be
[132] Fix | Delete
* used anywhere in WordPress. Also, plugins shouldn't use it either.
[133] Fix | Delete
*
[134] Fix | Delete
* @since 2.0.3
[135] Fix | Delete
* @deprecated 2.5.0
[136] Fix | Delete
*
[137] Fix | Delete
* @return bool Always returns false
[138] Fix | Delete
*/
[139] Fix | Delete
function wp_get_cookie_login() {
[140] Fix | Delete
_deprecated_function( __FUNCTION__, '2.5.0' );
[141] Fix | Delete
return false;
[142] Fix | Delete
}
[143] Fix | Delete
else :
[144] Fix | Delete
_deprecated_function( 'wp_get_cookie_login', '2.5.0' );
[145] Fix | Delete
endif;
[146] Fix | Delete
[147] Fix | Delete
if ( !function_exists('wp_login') ) :
[148] Fix | Delete
/**
[149] Fix | Delete
* Checks a users login information and logs them in if it checks out. This function is deprecated.
[150] Fix | Delete
*
[151] Fix | Delete
* Use the global $error to get the reason why the login failed. If the username
[152] Fix | Delete
* is blank, no error will be set, so assume blank username on that case.
[153] Fix | Delete
*
[154] Fix | Delete
* Plugins extending this function should also provide the global $error and set
[155] Fix | Delete
* what the error is, so that those checking the global for why there was a
[156] Fix | Delete
* failure can utilize it later.
[157] Fix | Delete
*
[158] Fix | Delete
* @since 1.2.2
[159] Fix | Delete
* @deprecated 2.5.0 Use wp_signon()
[160] Fix | Delete
* @see wp_signon()
[161] Fix | Delete
*
[162] Fix | Delete
* @global string $error Error when false is returned
[163] Fix | Delete
*
[164] Fix | Delete
* @param string $username User's username
[165] Fix | Delete
* @param string $password User's password
[166] Fix | Delete
* @param string $deprecated Not used
[167] Fix | Delete
* @return bool True on successful check, false on login failure.
[168] Fix | Delete
*/
[169] Fix | Delete
function wp_login($username, $password, $deprecated = '') {
[170] Fix | Delete
_deprecated_function( __FUNCTION__, '2.5.0', 'wp_signon()' );
[171] Fix | Delete
global $error;
[172] Fix | Delete
[173] Fix | Delete
$user = wp_authenticate($username, $password);
[174] Fix | Delete
[175] Fix | Delete
if ( ! is_wp_error($user) )
[176] Fix | Delete
return true;
[177] Fix | Delete
[178] Fix | Delete
$error = $user->get_error_message();
[179] Fix | Delete
return false;
[180] Fix | Delete
}
[181] Fix | Delete
else :
[182] Fix | Delete
_deprecated_function( 'wp_login', '2.5.0', 'wp_signon()' );
[183] Fix | Delete
endif;
[184] Fix | Delete
[185] Fix | Delete
/**
[186] Fix | Delete
* WordPress AtomPub API implementation.
[187] Fix | Delete
*
[188] Fix | Delete
* Originally stored in wp-app.php, and later wp-includes/class-wp-atom-server.php.
[189] Fix | Delete
* It is kept here in case a plugin directly referred to the class.
[190] Fix | Delete
*
[191] Fix | Delete
* @since 2.2.0
[192] Fix | Delete
* @deprecated 3.5.0
[193] Fix | Delete
*
[194] Fix | Delete
* @link https://wordpress.org/plugins/atom-publishing-protocol/
[195] Fix | Delete
*/
[196] Fix | Delete
if ( ! class_exists( 'wp_atom_server', false ) ) {
[197] Fix | Delete
class wp_atom_server {
[198] Fix | Delete
public function __call( $name, $arguments ) {
[199] Fix | Delete
_deprecated_function( __CLASS__ . '::' . $name, '3.5.0', 'the Atom Publishing Protocol plugin' );
[200] Fix | Delete
}
[201] Fix | Delete
[202] Fix | Delete
public static function __callStatic( $name, $arguments ) {
[203] Fix | Delete
_deprecated_function( __CLASS__ . '::' . $name, '3.5.0', 'the Atom Publishing Protocol plugin' );
[204] Fix | Delete
}
[205] Fix | Delete
}
[206] Fix | Delete
}
[207] Fix | Delete
[208] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function