Make WordPress Core


Ignore:
Timestamp:
11/16/2020 10:40:11 PM (4 years ago)
Author:
TimothyBlynJacobs
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/user.php

    r49475 r49617  
    351351            );
    352352        }
     353    } elseif ( ! wp_is_application_passwords_available() ) {
     354        $error = new WP_Error(
     355            'application_passwords_disabled',
     356            'Application passwords are not available.'
     357        );
    353358    } elseif ( ! wp_is_application_passwords_available_for_user( $user ) ) {
    354359        $error = new WP_Error(
    355             'application_passwords_disabled',
    356             __( 'Application passwords are disabled for the requested user.' )
     360            'application_passwords_disabled_for_user',
     361            __( 'Application passwords are not available for your account. Please contact the site administrator for assistance.' )
    357362        );
    358363    }
     
    41324137
    41334138/**
    4134  * Checks if Application Passwords is enabled for a specific user.
     4139 * Checks if Application Passwords is available for a specific user.
    41354140 *
    41364141 * By default all users can use Application Passwords. Use {@see 'wp_is_application_passwords_available_for_user'}
Note: See TracChangeset for help on using the changeset viewer.