rest_application_password_collect_status

函数
rest_application_password_collect_status ( $user_or_error, $app_password = array() )
参数
  • (WP_Error) $user_or_error The authenticated user or error instance.
    Required:
  • (array) $app_password The Application Password used to authenticate.
    Required:
    Default: array()
定义位置
相关方法
rest_application_password_check_errorsrest_cookie_collect_statusrest_add_application_passwords_to_indexwp_is_application_passwords_availablewp_is_application_passwords_available_for_user
引入
5.6.0
弃用
-

rest_application_password_collect_status: 这个过滤钩子允许开发者修改在检查应用程序密码的有效性时返回的状态。

收集用应用程序密码认证的状态。

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'];
	}
}

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2026-03-15 16:37:22

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: