wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.
rest_application_password_check_errors › WordPress Function
Od5.6.0
Przestarzałyn/a
› rest_application_password_check_errors ( $result )
| Parametry: |
|
| Powrót: |
|
| Zdefiniowane na: |
|
| Codex: |
Checks for errors when using application password-based authentication.
Źródło
function rest_application_password_check_errors( $result ) {
global $wp_rest_application_password_status;
if ( ! empty( $result ) ) {
return $result;
}
if ( is_wp_error( $wp_rest_application_password_status ) ) {
$data = $wp_rest_application_password_status->get_error_data();
if ( ! isset( $data['status'] ) ) {
$data['status'] = 401;
}
$wp_rest_application_password_status->add_data( $data );
return $wp_rest_application_password_status;
}
if ( $wp_rest_application_password_status instanceof WP_User ) {
return true;
}
return $result;
}