Make WordPress Core

Changeset 53472


Ignore:
Timestamp:
06/06/2022 10:33:15 PM (2 years ago)
Author:
audrasjb
Message:

Docs: Various fixes in wp-includes/pluggable.php docblocks, as per documentation standards.

See #55646.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/pluggable.php

    r53458 r53472  
    5454if ( ! function_exists( 'wp_get_current_user' ) ) :
    5555    /**
    56      * Retrieve the current user object.
     56     * Retrieves the current user object.
    5757     *
    5858     * Will set the current user, if the current user is not set. The current user
     
    7474if ( ! function_exists( 'get_userdata' ) ) :
    7575    /**
    76      * Retrieve user info by user ID.
     76     * Retrieves user info by user ID.
    7777     *
    7878     * @since 0.71
     
    8888if ( ! function_exists( 'get_user_by' ) ) :
    8989    /**
    90      * Retrieve user info by a given field
     90     * Retrieves user info by a given field.
    9191     *
    9292     * @since 2.8.0
     
    122122if ( ! function_exists( 'cache_users' ) ) :
    123123    /**
    124      * Retrieve info for user lists to prevent multiple queries by get_userdata()
     124     * Retrieves info for user lists to prevent multiple queries by get_userdata().
    125125     *
    126126     * @since 3.0.0
     
    590590if ( ! function_exists( 'wp_authenticate' ) ) :
    591591    /**
    592      * Authenticate a user, confirming the login credentials are valid.
     592     * Authenticates a user, confirming the login credentials are valid.
    593593     *
    594594     * @since 2.5.0
     
    616616         *                                        WP_Error or null otherwise.
    617617         * @param string                $username Username or email address.
    618          * @param string                $password User password
     618         * @param string                $password User password.
    619619         */
    620620        $user = apply_filters( 'authenticate', null, $username, $password );
     
    650650if ( ! function_exists( 'wp_logout' ) ) :
    651651    /**
    652      * Log the current user out.
     652     * Logs the current user out.
    653653     *
    654654     * @since 2.5.0
     
    14631463
    14641464    /**
    1465      * URL encode UTF-8 characters in a URL.
     1465     * URL encodes UTF-8 characters in a URL.
    14661466     *
    14671467     * @ignore
     
    15391539     * list.
    15401540     *
    1541      * If the host is not allowed, then the redirect is to $default supplied
     1541     * If the host is not allowed, then the redirect is to $default supplied.
    15421542     *
    15431543     * @since 2.8.1
    15441544     *
    1545      * @param string $location The redirect to validate
    1546      * @param string $default  The value to return if $location is not allowed
    1547      * @return string redirect-sanitized URL
     1545     * @param string $location The redirect to validate.
     1546     * @param string $default  The value to return if $location is not allowed.
     1547     * @return string redirect-sanitized URL.
    15481548     */
    15491549    function wp_validate_redirect( $location, $default = '' ) {
     
    16151615if ( ! function_exists( 'wp_notify_postauthor' ) ) :
    16161616    /**
    1617      * Notify an author (and/or others) of a comment/trackback/pingback on a post.
     1617     * Notifies an author (and/or others) of a comment/trackback/pingback on a post.
    16181618     *
    16191619     * @since 1.0.0
    16201620     *
    16211621     * @param int|WP_Comment $comment_id Comment ID or WP_Comment object.
    1622      * @param string         $deprecated Not used
     1622     * @param string         $deprecated Not used.
    16231623     * @return bool True on completion. False if no email addresses were specified.
    16241624     */
     
    20282028if ( ! function_exists( 'wp_password_change_notification' ) ) :
    20292029    /**
    2030      * Notify the blog admin of a user changing password, normally via email.
     2030     * Notifies the blog admin of a user changing password, normally via email.
    20312031     *
    20322032     * @since 2.7.0
     
    20822082if ( ! function_exists( 'wp_new_user_notification' ) ) :
    20832083    /**
    2084      * Email login credentials to a newly-registered user.
     2084     * Emails login credentials to a newly-registered user.
    20852085     *
    20862086     * A new user registration notification is also sent to admin email.
     
    23152315     *
    23162316     * @since 2.0.3
    2317      * @since 4.0.0 Session tokens were integrated with nonce creation
     2317     * @since 4.0.0 Session tokens were integrated with nonce creation.
    23182318     *
    23192319     * @param string|int $action Scalar value to add context to the nonce.
     
    23652365     * @link https://api.wordpress.org/secret-key/1.1/salt/ Create secrets for wp-config.php
    23662366     *
    2367      * @param string $scheme Authentication scheme (auth, secure_auth, logged_in, nonce)
     2367     * @param string $scheme Authentication scheme (auth, secure_auth, logged_in, nonce).
    23682368     * @return string Salt value
    23692369     */
     
    24412441if ( ! function_exists( 'wp_hash' ) ) :
    24422442    /**
    2443      * Get hash of given string.
     2443     * Gets hash of given string.
    24442444     *
    24452445     * @since 2.0.3
    24462446     *
    2447      * @param string $data   Plain text to hash
    2448      * @param string $scheme Authentication scheme (auth, secure_auth, logged_in, nonce)
    2449      * @return string Hash of $data
     2447     * @param string $data   Plain text to hash.
     2448     * @param string $scheme Authentication scheme (auth, secure_auth, logged_in, nonce).
     2449     * @return string Hash of $data.
    24502450     */
    24512451    function wp_hash( $data, $scheme = 'auth' ) {
     
    24582458if ( ! function_exists( 'wp_hash_password' ) ) :
    24592459    /**
    2460      * Create a hash (encrypt) of a plain text password.
     2460     * Creates a hash (encrypt) of a plain text password.
    24612461     *
    24622462     * For integration with other applications, this function can be overwritten to
     
    24672467     * @global PasswordHash $wp_hasher PHPass object
    24682468     *
    2469      * @param string $password Plain text user password to hash
    2470      * @return string The hash string of the password
     2469     * @param string $password Plain text user password to hash.
     2470     * @return string The hash string of the password.
    24712471     */
    24722472    function wp_hash_password( $password ) {
     
    24982498     *
    24992499     * @global PasswordHash $wp_hasher PHPass object used for checking the password
    2500      *                                 against the $hash + $password
     2500     *                                 against the $hash + $password.
    25012501     * @uses PasswordHash::CheckPassword
    25022502     *
    2503      * @param string     $password Plaintext user's password
     2503     * @param string     $password Plaintext user's password.
    25042504     * @param string     $hash     Hash of the user's password to check against.
    25052505     * @param string|int $user_id  Optional. User ID.
    2506      * @return bool False, if the $password does not match the hashed password
     2506     * @return bool False, if the $password does not match the hashed password.
    25072507     */
    25082508    function wp_check_password( $password, $hash, $user_id = '' ) {
     
    26002600     * @global string $rnd_value
    26012601     *
    2602      * @param int $min Lower limit for the generated number
    2603      * @param int $max Upper limit for the generated number
    2604      * @return int A random number between min and max
     2602     * @param int $min Lower limit for the generated number.
     2603     * @param int $max Upper limit for the generated number.
     2604     * @return int A random number between min and max.
    26052605     */
    26062606    function wp_rand( $min = 0, $max = 0 ) {
     
    26852685     * @global wpdb $wpdb WordPress database abstraction object.
    26862686     *
    2687      * @param string $password The plaintext new user password
    2688      * @param int    $user_id  User ID
     2687     * @param string $password The plaintext new user password.
     2688     * @param int    $user_id  User ID.
    26892689     */
    26902690    function wp_set_password( $password, $user_id ) {
     
    27072707if ( ! function_exists( 'get_avatar' ) ) :
    27082708    /**
    2709      * Retrieve the avatar `<img>` tag for a user, email address, MD5 hash, comment, or post.
     2709     * Retrieves the avatar `<img>` tag for a user, email address, MD5 hash, comment, or post.
    27102710     *
    27112711     * @since 2.5.0
     
    28882888     * @uses WP_Text_Diff_Renderer_Table
    28892889     *
    2890      * @param string       $left_string  "old" (left) version of string
    2891      * @param string       $right_string "new" (right) version of string
     2890     * @param string       $left_string  "old" (left) version of string.
     2891     * @param string       $right_string "new" (right) version of string.
    28922892     * @param string|array $args {
    28932893     *     Associative array of options to pass to WP_Text_Diff_Renderer_Table().
Note: See TracChangeset for help on using the changeset viewer.