Application Passwords: Improve various user-facing and developer-facing terminology.

Fixes #53503, #53691


git-svn-id: https://develop.svn.wordpress.org/trunk@51463 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn
2021-07-19 21:13:36 +00:00
parent c70fe62ed1
commit 0167d6dd50
5 changed files with 24 additions and 24 deletions
@@ -151,12 +151,12 @@ class WP_Application_Passwords {
}
/**
* Gets a user's application password with the given uuid.
* Gets a user's application password with the given UUID.
*
* @since 5.6.0
*
* @param int $user_id User ID.
* @param string $uuid The password's uuid.
* @param string $uuid The password's UUID.
* @return array|null The application password if found, null otherwise.
*/
public static function get_user_application_password( $user_id, $uuid ) {
@@ -198,7 +198,7 @@ class WP_Application_Passwords {
* @since 5.6.0
*
* @param int $user_id User ID.
* @param string $uuid The password's uuid.
* @param string $uuid The password's UUID.
* @param array $update Information about the application password to update.
* @return true|WP_Error True if successful, otherwise a WP_Error instance is returned on error.
*/
@@ -252,7 +252,7 @@ class WP_Application_Passwords {
* @since 5.6.0
*
* @param int $user_id User ID.
* @param string $uuid The password's uuid.
* @param string $uuid The password's UUID.
* @return true|WP_Error True if the usage was recorded, a WP_Error if an error occurs.
*/
public static function record_application_password_usage( $user_id, $uuid ) {
@@ -290,7 +290,7 @@ class WP_Application_Passwords {
* @since 5.6.0
*
* @param int $user_id User ID.
* @param string $uuid The password's uuid.
* @param string $uuid The password's UUID.
* @return true|WP_Error Whether the password was successfully found and deleted, a WP_Error otherwise.
*/
public static function delete_application_password( $user_id, $uuid ) {
@@ -491,7 +491,7 @@ class WP_REST_Application_Passwords_Controller extends WP_REST_Controller {
if ( get_current_user_id() !== $user->ID ) {
return new WP_Error(
'rest_cannot_introspect_app_password_for_non_authenticated_user',
__( 'The authenticated Application Password can only be introspected for the current user.' ),
__( 'The authenticated application password can only be introspected for the current user.' ),
array( 'status' => rest_authorization_required_code() )
);
}
@@ -519,7 +519,7 @@ class WP_REST_Application_Passwords_Controller extends WP_REST_Controller {
if ( ! $uuid ) {
return new WP_Error(
'rest_no_authenticated_app_password',
__( 'Cannot introspect Application Password.' ),
__( 'Cannot introspect application password.' ),
array( 'status' => 404 )
);
}
@@ -788,7 +788,7 @@ class WP_REST_Application_Passwords_Controller extends WP_REST_Controller {
'readonly' => true,
),
'app_id' => array(
'description' => __( 'A uuid provided by the application to uniquely identify it. It is recommended to use an UUID v5 with the URL or DNS namespace.' ),
'description' => __( 'A UUID provided by the application to uniquely identify it. It is recommended to use an UUID v5 with the URL or DNS namespace.' ),
'type' => 'string',
'format' => 'uuid',
'context' => array( 'view', 'edit', 'embed' ),