Changeset 51958
- Timestamp:
- 10/30/2021 08:25:19 PM (3 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-application-passwords.php
r51463 r51958 44 44 * Checks if Application Passwords are being used by the site. 45 45 * 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. 47 47 * 48 48 * @since 5.6.0 … … 62 62 * 63 63 * @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 * } 65 70 * @return array|WP_Error The first key in the array is the new password, the second is its detailed information. 66 71 * A WP_Error instance is returned on error. … … 111 116 * 112 117 * @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 * } 116 136 */ 117 137 do_action( 'wp_create_application_password', $user_id, $new_item, $new_password, $args ); … … 126 146 * 127 147 * @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 * } 129 161 */ 130 162 public static function get_user_application_passwords( $user_id ) { … … 173 205 174 206 /** 175 * Checks if a pplication name exists for this user.207 * Checks if an application password with the given name exists for this user. 176 208 * 177 209 * @since 5.7.0 … … 179 211 * @param int $user_id User ID. 180 212 * @param string $name Application name. 181 * @return bool Whether provided application name exists or not.213 * @return bool Whether the provided application name exists. 182 214 */ 183 215 public static function application_name_exists_for_user( $user_id, $name ) { … … 353 385 354 386 /** 355 * Sets a user s application passwords.387 * Sets a user's application passwords. 356 388 * 357 389 * @since 5.6.0 -
trunk/src/wp-includes/rest-api.php
r51908 r51958 1092 1092 * @global string|null $wp_rest_application_password_uuid 1093 1093 * 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. 1095 1095 */ 1096 1096 function rest_get_authenticated_app_password() { -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php
r51463 r51958 357 357 358 358 /** 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. 360 360 * 361 361 * @since 5.6.0 … … 383 383 384 384 /** 385 * Deletes all application passwords .385 * Deletes all application passwords for a user. 386 386 * 387 387 * @since 5.6.0 … … 412 412 413 413 /** 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. 415 415 * 416 416 * @since 5.6.0 … … 438 438 439 439 /** 440 * Deletes one application password.440 * Deletes an application password for a user. 441 441 * 442 442 * @since 5.6.0 … … 475 475 476 476 /** 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. 478 478 * 479 479 * @since 5.7.0 … … 501 501 502 502 /** 503 * Retrieves the application password being currently used for authentication .503 * Retrieves the application password being currently used for authentication of a user. 504 504 * 505 505 * @since 5.7.0 … … 724 724 725 725 /** 726 * Gets the requested application password .726 * Gets the requested application password for a user. 727 727 * 728 728 * @since 5.6.0
Note: See TracChangeset
for help on using the changeset viewer.