mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Application Passwords: Show HTTPS required message without filtering when not enabled or not in local environment.
When `add_filter( 'wp_is_application_passwords_available', '__return_false' )` exists, HTTPS requirement message is shown even if HTTPS is enabled on the site. This happens because `wp_is_application_passwords_available_for_user()` first invokes `wp_is_application_passwords_available()` which is filterable. The situation could happen if the `'wp_is_application_passwords_available_for_user'` filter returns `false`. To fix this, the check for HTTPS (or if in a 'local' environment) is moved to a new function called `wp_is_application_passwords_supported()`. Then the return from this function is used as an OR condition for the Application Passwords section and for displaying the HTTPS required message. Tests are included for both `wp_is_application_passwords_supported()` and `wp_is_application_passwords_available()`. Follow-up to [51980], [51988]. Props davidbinda, SergeyBiryukov, ocean90, felipeelia, costdev, hellofromTonya. Fixes #53658. git-svn-id: https://develop.svn.wordpress.org/trunk@52398 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -18,7 +18,13 @@ mockedApiResponse.Schema = {
|
||||
"wp-site-health/v1",
|
||||
"wp-block-editor/v1"
|
||||
],
|
||||
"authentication": [],
|
||||
"authentication": {
|
||||
"application-passwords": {
|
||||
"endpoints": {
|
||||
"authorization": "http://example.org/wp-admin/authorize-application.php"
|
||||
}
|
||||
}
|
||||
},
|
||||
"routes": {
|
||||
"/": {
|
||||
"namespace": "",
|
||||
|
||||
Reference in New Issue
Block a user