Users: Enable Application Passwords for local development environments, even if HTTPS is not available.
This will make testing the new feature easier since the local development environment is only accessible via HTTP by default. Also update docs to link to the relevant filters. See #42790. Fixes #51503. Built from https://develop.svn.wordpress.org/trunk@49139 git-svn-id: http://core.svn.wordpress.org/trunk@48901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7137daec42
commit
4dfe5ecfe1
|
@ -4097,14 +4097,16 @@ function wp_get_user_request( $request_id ) {
|
||||||
/**
|
/**
|
||||||
* Checks if Application Passwords is globally available.
|
* Checks if Application Passwords is globally available.
|
||||||
*
|
*
|
||||||
* By default, Application Passwords is available to all sites using SSL, but this function is
|
* By default, Application Passwords is available to all sites using SSL or to local environments.
|
||||||
* filterable to adjust its availability.
|
* Use {@see 'wp_is_application_passwords_available'} to adjust its availability.
|
||||||
*
|
*
|
||||||
* @since 5.6.0
|
* @since 5.6.0
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function wp_is_application_passwords_available() {
|
function wp_is_application_passwords_available() {
|
||||||
|
$available = is_ssl() || 'local' === wp_get_environment_type();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters whether Application Passwords is available.
|
* Filters whether Application Passwords is available.
|
||||||
*
|
*
|
||||||
|
@ -4112,14 +4114,14 @@ function wp_is_application_passwords_available() {
|
||||||
*
|
*
|
||||||
* @param bool $available True if available, false otherwise.
|
* @param bool $available True if available, false otherwise.
|
||||||
*/
|
*/
|
||||||
return apply_filters( 'wp_is_application_passwords_available', is_ssl() );
|
return apply_filters( 'wp_is_application_passwords_available', $available );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if Application Passwords is enabled for a specific user.
|
* Checks if Application Passwords is enabled for a specific user.
|
||||||
*
|
*
|
||||||
* By default all users can use Application Passwords, but this function is filterable to restrict
|
* By default all users can use Application Passwords. Use {@see 'wp_is_application_passwords_available_for_user'}
|
||||||
* availability to certain users.
|
* to restrict availability to certain users.
|
||||||
*
|
*
|
||||||
* @since 5.6.0
|
* @since 5.6.0
|
||||||
*
|
*
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.6-alpha-49138';
|
$wp_version = '5.6-alpha-49139';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue