mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
App Passwords: Unify availability language.
Previously App Passwords used a mix of "enabled" and "available". We've now standardized on using "available". Additionally, we now use a 501 status code when indicating that App Passwords is not available. Props SergeyBiryukov, ocean90, TimothyBlynJacobs. Fixes #51513. git-svn-id: https://develop.svn.wordpress.org/trunk@49617 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
+4
-4
@@ -503,8 +503,8 @@ class WP_REST_Application_Passwords_Controller extends WP_REST_Controller {
|
||||
if ( ! wp_is_application_passwords_available() ) {
|
||||
return new WP_Error(
|
||||
'application_passwords_disabled',
|
||||
__( 'Application passwords are not enabled.' ),
|
||||
array( 'status' => 500 )
|
||||
__( 'Application passwords are not available.' ),
|
||||
array( 'status' => 501 )
|
||||
);
|
||||
}
|
||||
|
||||
@@ -547,8 +547,8 @@ class WP_REST_Application_Passwords_Controller extends WP_REST_Controller {
|
||||
if ( ! wp_is_application_passwords_available_for_user( $user ) ) {
|
||||
return new WP_Error(
|
||||
'application_passwords_disabled_for_user',
|
||||
__( 'Application passwords are not enabled for your account. Please contact the site administrator for assistance.' ),
|
||||
array( 'status' => 500 )
|
||||
__( 'Application passwords are not available for your account. Please contact the site administrator for assistance.' ),
|
||||
array( 'status' => 501 )
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user