Make WordPress Core

Changeset 51958


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

Application Passwords: Various docblock improvements.

See #53399, #42790

Location:
trunk/src/wp-includes
Files:
3 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
  • trunk/src/wp-includes/rest-api.php

    r51908 r51958  
    10921092 * @global string|null $wp_rest_application_password_uuid
    10931093 *
    1094  * @return string|null The App Password UUID, or null if Application Passwords was not used.
     1094 * @return string|null The Application Password UUID, or null if Application Passwords was not used.
    10951095 */
    10961096function rest_get_authenticated_app_password() {
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php

    r51463 r51958  
    357357
    358358        /**
    359          * Checks if a given request has access to delete all application passwords.
     359         * Checks if a given request has access to delete all application passwords for a user.
    360360         *
    361361         * @since 5.6.0
     
    383383
    384384        /**
    385          * Deletes all application passwords.
     385         * Deletes all application passwords for a user.
    386386         *
    387387         * @since 5.6.0
     
    412412
    413413        /**
    414          * Checks if a given request has access to delete a specific application password.
     414         * Checks if a given request has access to delete a specific application password for a user.
    415415         *
    416416         * @since 5.6.0
     
    438438
    439439        /**
    440          * Deletes one application password.
     440         * Deletes an application password for a user.
    441441         *
    442442         * @since 5.6.0
     
    475475
    476476        /**
    477          * Checks if a given request has access to get the currently used application password.
     477         * Checks if a given request has access to get the currently used application password for a user.
    478478         *
    479479         * @since 5.7.0
     
    501501
    502502        /**
    503          * Retrieves the application password being currently used for authentication.
     503         * Retrieves the application password being currently used for authentication of a user.
    504504         *
    505505         * @since 5.7.0
     
    724724
    725725        /**
    726          * Gets the requested application password.
     726         * Gets the requested application password for a user.
    727727         *
    728728         * @since 5.6.0
Note: See TracChangeset for help on using the changeset viewer.