Make WordPress Core


Ignore:
Timestamp:
10/30/2021 08:25:19 PM (3 years ago)
Author:
johnbillion
Message:

Application Passwords: Various docblock improvements.

See #53399, #42790

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-application-passwords.php

    r51463 r51958  
    4444     * Checks if Application Passwords are being used by the site.
    4545     *
    46      * This returns true if at least one App Password has ever been created.
     46     * This returns true if at least one Application Password has ever been created.
    4747     *
    4848     * @since 5.6.0
     
    6262     *
    6363     * @param int   $user_id  User ID.
    64      * @param array $args     Information about the application password.
     64     * @param array $args     {
     65     *     Arguments used to create the application password.
     66     *
     67     *     @type string $name   The name of the application password.
     68     *     @type string $app_id A UUID provided by the application to uniquely identify it.
     69     * }
    6570     * @return array|WP_Error The first key in the array is the new password, the second is its detailed information.
    6671     *                        A WP_Error instance is returned on error.
     
    111116         *
    112117         * @param int    $user_id      The user ID.
    113          * @param array  $new_item     The details about the created password.
    114          * @param string $new_password The unhashed generated app password.
    115          * @param array  $args         Information used to create the application password.
     118         * @param array  $new_item     {
     119         *     The details about the created password.
     120         *
     121         *     @type string $uuid      The unique identifier for the application password.
     122         *     @type string $app_id    A UUID provided by the application to uniquely identify it.
     123         *     @type string $name      The name of the application password.
     124         *     @type string $password  A one-way hash of the password.
     125         *     @type int    $created   Unix timestamp of when the password was created.
     126         *     @type null   $last_used Null.
     127         *     @type null   $last_ip   Null.
     128         * }
     129         * @param string $new_password The unhashed generated application password.
     130         * @param array  $args         {
     131         *     Arguments used to create the application password.
     132         *
     133         *     @type string $name   The name of the application password.
     134         *     @type string $app_id A UUID provided by the application to uniquely identify it.
     135         * }
    116136         */
    117137        do_action( 'wp_create_application_password', $user_id, $new_item, $new_password, $args );
     
    126146     *
    127147     * @param int $user_id User ID.
    128      * @return array The list of app passwords.
     148     * @return array {
     149     *     The list of app passwords.
     150     *
     151     *     @type array ...$0 {
     152     *         @type string      $uuid      The unique identifier for the application password.
     153     *         @type string      $app_id    A UUID provided by the application to uniquely identify it.
     154     *         @type string      $name      The name of the application password.
     155     *         @type string      $password  A one-way hash of the password.
     156     *         @type int         $created   Unix timestamp of when the password was created.
     157     *         @type int|null    $last_used The Unix timestamp of the GMT date the application password was last used.
     158     *         @type string|null $last_ip   The IP address the application password was last used by.
     159     *     }
     160     * }
    129161     */
    130162    public static function get_user_application_passwords( $user_id ) {
     
    173205
    174206    /**
    175      * Checks if application name exists for this user.
     207     * Checks if an application password with the given name exists for this user.
    176208     *
    177209     * @since 5.7.0
     
    179211     * @param int    $user_id User ID.
    180212     * @param string $name    Application name.
    181      * @return bool Whether provided application name exists or not.
     213     * @return bool Whether the provided application name exists.
    182214     */
    183215    public static function application_name_exists_for_user( $user_id, $name ) {
     
    353385
    354386    /**
    355      * Sets a users application passwords.
     387     * Sets a user's application passwords.
    356388     *
    357389     * @since 5.6.0
Note: See TracChangeset for help on using the changeset viewer.