rest_application_password_collect_status()
Collects the status of authenticating with an application password.
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
rest_application_password_collect_status( $user_or_error, $app_password );
- $user_or_error(WP_Error) (обязательный)
- The authenticated user or error instance.
- $app_password(массив)
- The Application Password used to authenticate.
По умолчанию: array()
Заметки
- Global. WP_User|WP_Error|null. $wp_rest_application_password_status
- Global. Строка|null. $wp_rest_application_password_uuid
Список изменений
С версии 5.6.0 | Введена. |
С версии 5.7.0 | Added the $app_password parameter. |
Код rest_application_password_collect_status() rest application password collect status WP 6.6.2
function rest_application_password_collect_status( $user_or_error, $app_password = array() ) { global $wp_rest_application_password_status, $wp_rest_application_password_uuid; $wp_rest_application_password_status = $user_or_error; if ( empty( $app_password['uuid'] ) ) { $wp_rest_application_password_uuid = null; } else { $wp_rest_application_password_uuid = $app_password['uuid']; } }