Changeset 32614
- Timestamp:
- 05/27/2015 03:31:46 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/pluggable.php
r32465 r32614 18 18 * 19 19 * @since 2.0.3 20 * @global object$current_user The current user object which holds the user data.21 * 22 * @param int $idUser ID20 * @global WP_User $current_user The current user object which holds the user data. 21 * 22 * @param int $id User ID 23 23 * @param string $name User's username 24 24 * @return WP_User Current user User object … … 50 50 * 51 51 * @since 2.0.3 52 * 53 * @global WP_User $current_user 52 54 * 53 55 * @return WP_User Current user WP_User object … … 72 74 * @since 0.71 73 75 * 74 * @ uses$current_user Checks if the current user is set75 * 76 * @return null|false False on XML-RPC Request and invalid auth cookie. Null when current user set.76 * @global WP_User $current_user Checks if the current user is set 77 * 78 * @return false|void False on XML-RPC Request and invalid auth cookie. 77 79 */ 78 80 function get_currentuserinfo() { … … 132 134 * 133 135 * @param int $user_id User ID 134 * @return WP_User| boolWP_User object on success, false on failure.136 * @return WP_User|false WP_User object on success, false on failure. 135 137 */ 136 138 function get_userdata( $user_id ) { … … 145 147 * @since 2.8.0 146 148 * 147 * @param string $field The field to retrieve the user with. id | slug | email | login149 * @param string $field The field to retrieve the user with. id | slug | email | login 148 150 * @param int|string $value A value for $field. A user ID, slug, email address, or login name. 149 * @return WP_User| boolWP_User object on success, false on failure.151 * @return WP_User|false WP_User object on success, false on failure. 150 152 */ 151 153 function get_user_by( $field, $value ) { … … 167 169 * 168 170 * @since 3.0.0 171 * 172 * @global wpdb $wpdb 169 173 * 170 174 * @param array $user_ids User ID numbers list … … 213 217 * @since 1.2.1 214 218 * 215 * @ uses PHPMailer216 * 217 * @param string|array $to Array or comma-separated list of email addresses to send message.218 * @param string $subjectEmail subject219 * @param string $messageMessage contents220 * @param string|array $headers Optional. Additional headers.219 * @global PHPMailer $phpmailer 220 * 221 * @param string|array $to Array or comma-separated list of email addresses to send message. 222 * @param string $subject Email subject 223 * @param string $message Message contents 224 * @param string|array $headers Optional. Additional headers. 221 225 * @param string|array $attachments Optional. Files to attach. 222 226 * @return bool Whether the email contents were sent successfully. … … 617 621 * @since 2.5.0 618 622 * 623 * @global int $login_grace_period 624 * 619 625 * @param string $cookie Optional. If used, will validate contents instead of cookie's 620 626 * @param string $scheme Optional. The cookie scheme to use: auth, secure_auth, or logged_in 621 * @return bool|int False if invalid cookie, User ID if valid.627 * @return false|int False if invalid cookie, User ID if valid. 622 628 */ 623 629 function wp_validate_auth_cookie($cookie = '', $scheme = '') { … … 724 730 * @since 2.5.0 725 731 * 726 * @param int $user_idUser ID727 * @param int $expiration Cookie expiration in seconds728 * @param string $scheme Optional. The cookie scheme to use: auth, secure_auth, or logged_in729 * @param string $token User's session token to use for this cookie732 * @param int $user_id User ID 733 * @param int $expiration Cookie expiration in seconds 734 * @param string $scheme Optional. The cookie scheme to use: auth, secure_auth, or logged_in 735 * @param string $token User's session token to use for this cookie 730 736 * @return string Authentication cookie contents. Empty string if user does not exist. 731 737 */ … … 774 780 * @param string $cookie 775 781 * @param string $scheme Optional. The cookie scheme to use: auth, secure_auth, or logged_in 776 * @return array Authentication cookie components782 * @return array|false Authentication cookie components 777 783 */ 778 784 function wp_parse_auth_cookie($cookie = '', $scheme = '') { … … 825 831 * @since 4.3.0 Added the `$token` parameter. 826 832 * 827 * @param int $user_idUser ID828 * @param bool $remember Whether to remember the user829 * @param mixed $secureWhether the admin cookies should only be sent over HTTPS.830 * Default is_ssl().831 * @param string $token Optional. User's session token to use for this cookie.833 * @param int $user_id User ID 834 * @param bool $remember Whether to remember the user 835 * @param mixed $secure Whether the admin cookies should only be sent over HTTPS. 836 * Default is_ssl(). 837 * @param string $token Optional. User's session token to use for this cookie. 832 838 */ 833 839 function wp_set_auth_cookie( $user_id, $remember = false, $secure = '', $token = '' ) { … … 981 987 $user = wp_get_current_user(); 982 988 983 if ( ! $user->exists() ) 984 return false; 985 986 return true; 989 return $user->exists(); 987 990 } 988 991 endif; … … 1163 1166 * @since 1.5.1 1164 1167 * 1168 * @global bool $is_IIS 1169 * 1165 1170 * @param string $location The path to redirect to. 1166 * @param int $statusStatus code to use.1171 * @param int $status Status code to use. 1167 1172 * @return bool False if $location is not provided, true otherwise. 1168 1173 */ … … 1231 1236 // remove %0d and %0a from location 1232 1237 $strip = array('%0d', '%0a', '%0D', '%0A'); 1233 $location = _deep_replace($strip, $location); 1234 return $location; 1238 return _deep_replace( $strip, $location ); 1235 1239 } 1236 1240 … … 1262 1266 * 1263 1267 * @since 2.3.0 1264 * 1265 * @return void Does not return anything 1266 **/ 1268 */ 1267 1269 function wp_safe_redirect($location, $status = 302) { 1268 1270 … … 1289 1291 * 1290 1292 * @param string $location The redirect to validate 1291 * @param string $default The value to return if $location is not allowed1293 * @param string $default The value to return if $location is not allowed 1292 1294 * @return string redirect-sanitized URL 1293 1295 **/ … … 1340 1342 * @since 1.0.0 1341 1343 * 1342 * @param int $comment_id Comment ID1344 * @param int $comment_id Comment ID 1343 1345 * @param string $deprecated Not used 1344 1346 * @return bool True on completion. False if no email addresses were specified. … … 1536 1538 * 1537 1539 * @param int $comment_id Comment ID 1538 * @return boolAlways returns true1540 * @return true Always returns true 1539 1541 */ 1540 1542 function wp_notify_moderator($comment_id) { … … 1841 1843 * @link https://api.wordpress.org/secret-key/1.1/salt/ Create secrets for wp-config.php 1842 1844 * 1845 * @staticvar array $cached_salts 1846 * @staticvar array $duplicated_keys 1847 * 1843 1848 * @param string $scheme Authentication scheme (auth, secure_auth, logged_in, nonce) 1844 1849 * @return string Salt value … … 1940 1945 * @since 2.5.0 1941 1946 * 1942 * @global object $wp_hasher PHPass object 1943 * @uses PasswordHash::HashPassword 1947 * @global PasswordHash $wp_hasher PHPass object 1944 1948 * 1945 1949 * @param string $password Plain text user password to hash … … 1973 1977 * @since 2.5.0 1974 1978 * 1975 * @global object$wp_hasher PHPass object used for checking the password1979 * @global PasswordHash $wp_hasher PHPass object used for checking the password 1976 1980 * against the $hash + $password 1977 1981 * @uses PasswordHash::CheckPassword 1978 1982 * 1979 1983 * @param string $password Plaintext user's password 1980 * @param string $hash Hash of the user's password to check against.1984 * @param string $hash Hash of the user's password to check against. 1981 1985 * @return bool False, if the $password does not match the hashed password 1982 1986 */ … … 2062 2066 * 2063 2067 * @since 2.6.2 2068 * 2069 * @global string $rnd_value 2070 * @staticvar string $seed 2064 2071 * 2065 2072 * @param int $min Lower limit for the generated number … … 2120 2127 * 2121 2128 * @param string $password The plaintext new user password 2122 * @param int $user_idUser ID2129 * @param int $user_id User ID 2123 2130 */ 2124 2131 function wp_set_password( $password, $user_id ) { … … 2298 2305 * @uses WP_Text_Diff_Renderer_Table 2299 2306 * 2300 * @param string $left_string"old" (left) version of string2301 * @param string $right_string "new" (right) version of string2302 * @param string|array $args Optional. Change 'title', 'title_left', and 'title_right' defaults.2307 * @param string $left_string "old" (left) version of string 2308 * @param string $right_string "new" (right) version of string 2309 * @param string|array $args Optional. Change 'title', 'title_left', and 'title_right' defaults. 2303 2310 * @return string Empty string if strings are equivalent or HTML with differences. 2304 2311 */
Note: See TracChangeset
for help on using the changeset viewer.