IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 19 | 19 | * @since 2.5.0 |
| 20 | 20 | * |
| 21 | 21 | * @param array $credentials Optional. User info in order to sign on. |
| 22 | | * @param bool $secure_cookie Optional. Whether to use secure cookie. |
| 23 | | * @return object Either WP_Error on failure, or WP_User on success. |
| | 22 | * @param string $secure_cookie Optional. 'true' or 'false'; whether to use secure cookie. |
| | 23 | * @return \WP_Error|\WP_User WP_Error on failure, or WP_User on success. |
| 24 | 24 | */ |
| 25 | | function wp_signon( $credentials = '', $secure_cookie = '' ) { |
| | 25 | function wp_signon( $credentials = array(), $secure_cookie = '' ) { |
| 26 | 26 | if ( empty($credentials) ) { |
| 27 | 27 | if ( ! empty($_POST['log']) ) |
| 28 | 28 | $credentials['user_login'] = $_POST['log']; |
| … |
… |
|
| 99 | 99 | return $user; |
| 100 | 100 | } |
| 101 | 101 | |
| | 102 | add_filter( 'authenticate', 'wp_authenticate_username_password', 20, 3 ); |
| | 103 | |
| 102 | 104 | /** |
| 103 | 105 | * Authenticate the user using the username and password. |
| | 106 | * |
| | 107 | * @since 2.8.0 |
| | 108 | * |
| | 109 | * @param WP_User|object $user |
| | 110 | * @param $username |
| | 111 | * @param $password |
| | 112 | * |
| | 113 | * @return bool|mixed|void|WP_Error|WP_User |
| 104 | 114 | */ |
| 105 | | add_filter('authenticate', 'wp_authenticate_username_password', 20, 3); |
| 106 | | function wp_authenticate_username_password($user, $username, $password) { |
| | 115 | function wp_authenticate_username_password( $user, $username, $password ) { |
| 107 | 116 | if ( is_a($user, 'WP_User') ) { return $user; } |
| 108 | 117 | |
| 109 | 118 | if ( empty($username) || empty($password) ) { |
| … |
… |
|
| 148 | 157 | |
| 149 | 158 | /** |
| 150 | 159 | * Authenticate the user using the WordPress auth cookie. |
| | 160 | * |
| | 161 | * @since 2.8.0 |
| | 162 | * |
| | 163 | * @param WP_User|object $user |
| | 164 | * @param string $username |
| | 165 | * @param string $password |
| | 166 | * |
| | 167 | * @return WP_User|WP_Error The authenticated user, or an error. |
| 151 | 168 | */ |
| 152 | | function wp_authenticate_cookie($user, $username, $password) { |
| | 169 | function wp_authenticate_cookie( $user, $username, $password ) { |
| 153 | 170 | if ( is_a($user, 'WP_User') ) { return $user; } |
| 154 | 171 | |
| 155 | 172 | if ( empty($username) && empty($password) ) { |
| … |
… |
|
| 178 | 195 | * spammer, or if the user's primary blog has been marked as spam. |
| 179 | 196 | * |
| 180 | 197 | * @since 3.7.0 |
| | 198 | * |
| | 199 | * @param WP_User|object $user The user to check for spam. |
| | 200 | * |
| | 201 | * @return WP_User|WP_Error The user if clean, error if spammy. |
| 181 | 202 | */ |
| 182 | 203 | function wp_authenticate_spam_check( $user ) { |
| 183 | 204 | if ( $user && is_a( $user, 'WP_User' ) && is_multisite() ) { |
| … |
… |
|
| 341 | 362 | * Deletes the user option if $newvalue is empty. |
| 342 | 363 | * |
| 343 | 364 | * @since 2.0.0 |
| 344 | | * @uses $wpdb WordPress database object for queries |
| | 365 | * @uses $wpdb WordPress database object for queries. |
| | 366 | * @see update_user_meta() for return value. |
| 345 | 367 | * |
| 346 | | * @param int $user_id User ID |
| | 368 | * @param int $user_id User ID. |
| 347 | 369 | * @param string $option_name User option name. |
| 348 | 370 | * @param mixed $newvalue User option value. |
| 349 | 371 | * @param bool $global Optional. Whether option name is global or blog specific. Default false (blog specific). |
| 350 | | * @return unknown |
| | 372 | * |
| | 373 | * @return int|bool Meta ID if the key didn't exist, true on successful update, false on failure. |
| 351 | 374 | */ |
| 352 | 375 | function update_user_option( $user_id, $option_name, $newvalue, $global = false ) { |
| 353 | 376 | global $wpdb; |
| … |
… |
|
| 366 | 389 | * it will prepend the WordPress table prefix to the option name. |
| 367 | 390 | * |
| 368 | 391 | * @since 3.0.0 |
| 369 | | * @uses $wpdb WordPress database object for queries |
| | 392 | * @uses $wpdb WordPress database object for queries. |
| | 393 | * @see delete_user_meta() for return value. |
| 370 | 394 | * |
| 371 | 395 | * @param int $user_id User ID |
| 372 | 396 | * @param string $option_name User option name. |
| 373 | 397 | * @param bool $global Optional. Whether option name is global or blog specific. Default false (blog specific). |
| 374 | | * @return unknown |
| | 398 | * |
| | 399 | * @return bool True on success, false on failure. |
| 375 | 400 | */ |
| 376 | 401 | function delete_user_option( $user_id, $option_name, $global = false ) { |
| 377 | 402 | global $wpdb; |
| … |
… |
|
| 423 | 448 | var $query_limit; |
| 424 | 449 | |
| 425 | 450 | /** |
| 426 | | * PHP5 constructor |
| | 451 | * PHP5 constructor. |
| 427 | 452 | * |
| 428 | 453 | * @since 3.1.0 |
| 429 | 454 | * |
| 430 | | * @param string|array $args The query variables |
| | 455 | * @param string|array $query Optional. The query variables. |
| 431 | 456 | * @return WP_User_Query |
| 432 | 457 | */ |
| 433 | 458 | function __construct( $query = null ) { |
| … |
… |
|
| 438 | 463 | } |
| 439 | 464 | |
| 440 | 465 | /** |
| 441 | | * Prepare the query variables |
| | 466 | * Prepare the query variables. |
| 442 | 467 | * |
| 443 | 468 | * @since 3.1.0 |
| 444 | 469 | * |
| 445 | | * @param string|array $args The query variables |
| | 470 | * @param string|array $query Optional. The query variables. |
| 446 | 471 | */ |
| 447 | 472 | function prepare_query( $query = array() ) { |
| 448 | 473 | global $wpdb; |
| … |
… |
|
| 650 | 675 | } |
| 651 | 676 | |
| 652 | 677 | /** |
| 653 | | * Execute the query, with the current variables |
| | 678 | * Execute the query, with the current variables. |
| 654 | 679 | * |
| 655 | 680 | * @since 3.1.0 |
| | 681 | * @global wpdb $wpdb WordPress database object. |
| 656 | 682 | */ |
| 657 | 683 | function query() { |
| 658 | 684 | global $wpdb; |
| … |
… |
|
| 755 | 781 | } |
| 756 | 782 | |
| 757 | 783 | /** |
| 758 | | * Return the list of users |
| | 784 | * Return the list of users. |
| 759 | 785 | * |
| 760 | 786 | * @since 3.1.0 |
| 761 | 787 | * @access public |
| … |
… |
|
| 767 | 793 | } |
| 768 | 794 | |
| 769 | 795 | /** |
| 770 | | * Return the total number of users for the current query |
| | 796 | * Return the total number of users for the current query. |
| 771 | 797 | * |
| 772 | 798 | * @since 3.1.0 |
| 773 | 799 | * @access public |
| … |
… |
|
| 803 | 829 | * Get the blogs a user belongs to. |
| 804 | 830 | * |
| 805 | 831 | * @since 3.0.0 |
| | 832 | * @global wpdb $wpdb The WordPress database object. |
| 806 | 833 | * |
| 807 | | * @param int $user_id User ID |
| | 834 | * @param int $user_id User ID. |
| 808 | 835 | * @param bool $all Whether to retrieve all blogs, or only blogs that are not marked as deleted, archived, or spam. |
| 809 | 836 | * @return array A list of the user's blogs. An empty array if the user doesn't exist or belongs to no blogs. |
| 810 | 837 | */ |