WordPress 3.0 beta 1 documentation kindly provided to you by Hay Kranen
| [ Index ] |
PHP Cross Reference of WordPress 3.0 beta 1 |
|
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * Deprecated pluggable functions from past WordPress versions. You shouldn't use these 4 * functions and look for the alternatives instead. The functions will be removed in a 5 * later version. 6 * 7 * Deprecated warnings are also thrown if one of these functions is being defined by a plugin. 8 * 9 * @package WordPress 10 * @subpackage Deprecated 11 * @see pluggable.php 12 */ 13 14 /* 15 * Deprecated functions come here to die. 16 */ 17 18 if ( !function_exists('wp_setcookie') ) : 19 /** 20 * Sets a cookie for a user who just logged in. This function is deprecated. 21 * 22 * @since 1.5 23 * @deprecated 2.5 24 * @deprecated Use wp_set_auth_cookie() 25 * @see wp_set_auth_cookie() 26 * 27 * @param string $username The user's username 28 * @param string $password Optional. The user's password 29 * @param bool $already_md5 Optional. Whether the password has already been through MD5 30 * @param string $home Optional. Will be used instead of COOKIEPATH if set 31 * @param string $siteurl Optional. Will be used instead of SITECOOKIEPATH if set 32 * @param bool $remember Optional. Remember that the user is logged in 33 */ 34 function wp_setcookie($username, $password = '', $already_md5 = false, $home = '', $siteurl = '', $remember = false) { 35 _deprecated_function( __FUNCTION__, '2.5', 'wp_set_auth_cookie()' ); 36 $user = get_userdatabylogin($username); 37 wp_set_auth_cookie($user->ID, $remember); 38 } 39 else : 40 _deprecated_function( 'wp_setcookie', '2.5', 'wp_set_auth_cookie()' ); 41 endif; 42 43 if ( !function_exists('wp_clearcookie') ) : 44 /** 45 * Clears the authentication cookie, logging the user out. This function is deprecated. 46 * 47 * @since 1.5 48 * @deprecated 2.5 49 * @deprecated Use wp_clear_auth_cookie() 50 * @see wp_clear_auth_cookie() 51 */ 52 function wp_clearcookie() { 53 _deprecated_function( __FUNCTION__, '2.5', 'wp_clear_auth_cookie()' ); 54 wp_clear_auth_cookie(); 55 } 56 else : 57 _deprecated_function( 'wp_clearcookie', '2.5', 'wp_clear_auth_cookie()' ); 58 endif; 59 60 if ( !function_exists('wp_get_cookie_login') ): 61 /** 62 * Gets the user cookie login. This function is deprecated. 63 * 64 * This function is deprecated and should no longer be extended as it won't be 65 * used anywhere in WordPress. Also, plugins shouldn't use it either. 66 * 67 * @since 2.0.3 68 * @deprecated 2.5 69 * @deprecated No alternative 70 * 71 * @return bool Always returns false 72 */ 73 function wp_get_cookie_login() { 74 _deprecated_function( __FUNCTION__, '2.5' ); 75 return false; 76 } 77 else : 78 _deprecated_function( 'wp_get_cookie_login', '2.5' ); 79 endif; 80 81 if ( !function_exists('wp_login') ) : 82 /** 83 * Checks a users login information and logs them in if it checks out. This function is deprecated. 84 * 85 * Use the global $error to get the reason why the login failed. If the username 86 * is blank, no error will be set, so assume blank username on that case. 87 * 88 * Plugins extending this function should also provide the global $error and set 89 * what the error is, so that those checking the global for why there was a 90 * failure can utilize it later. 91 * 92 * @since 1.2.2 93 * @deprecated Use wp_signon() 94 * @global string $error Error when false is returned 95 * 96 * @param string $username User's username 97 * @param string $password User's password 98 * @param bool $deprecated Not used 99 * @return bool False on login failure, true on successful check 100 */ 101 function wp_login($username, $password, $deprecated = '') { 102 _deprecated_function( __FUNCTION__, '2.5', 'wp_signon()' ); 103 global $error; 104 105 $user = wp_authenticate($username, $password); 106 107 if ( ! is_wp_error($user) ) 108 return true; 109 110 $error = $user->get_error_message(); 111 return false; 112 } 113 else : 114 _deprecated_function( 'wp_login', '2.5', 'wp_signon()' ); 115 endif;
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Mon Apr 5 14:26:09 2010 | Cross-referenced by PHPXref 0.7 |