Changeset 50065 for trunk/src/wp-includes/rest-api.php
- Timestamp:
- 01/29/2021 12:05:20 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api.php
r50060 r50065 1049 1049 * 1050 1050 * @since 5.6.0 1051 * @since 5.7.0 Added the `$app_password` parameter. 1051 1052 * 1052 1053 * @global WP_User|WP_Error|null $wp_rest_application_password_status 1054 * @global string|null $wp_rest_application_password_uuid 1053 1055 * 1054 1056 * @param WP_Error $user_or_error The authenticated user or error instance. 1055 */ 1056 function rest_application_password_collect_status( $user_or_error ) { 1057 global $wp_rest_application_password_status; 1057 * @param array $app_password The Application Password used to authenticate. 1058 */ 1059 function rest_application_password_collect_status( $user_or_error, $app_password = array() ) { 1060 global $wp_rest_application_password_status, $wp_rest_application_password_uuid; 1058 1061 1059 1062 $wp_rest_application_password_status = $user_or_error; 1063 1064 if ( empty( $app_password['uuid'] ) ) { 1065 $wp_rest_application_password_uuid = null; 1066 } else { 1067 $wp_rest_application_password_uuid = $app_password['uuid']; 1068 } 1069 } 1070 1071 /** 1072 * Gets the Application Password used for authenticating the request. 1073 * 1074 * @since 5.7.0 1075 * 1076 * @global string|null $wp_rest_application_password_uuid 1077 * 1078 * @return string|null The App Password UUID, or null if Application Passwords was not used. 1079 */ 1080 function rest_get_authenticated_app_password() { 1081 global $wp_rest_application_password_uuid; 1082 1083 return $wp_rest_application_password_uuid; 1060 1084 } 1061 1085
Note: See TracChangeset
for help on using the changeset viewer.