PluginProbe
NETSENSAI Shield / trunk
NETSENSAI Shield vtrunk
1.6.1 trunk 1.1 1.2 1.3 1.4 1.4.1 1.4.2 1.4.3 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.6.0
netsensai-shield / includes / disable_app_passwords.php

disable_app_passwords.php in NETSENSAI Shield trunk, at includes/disable_app_passwords.php

22 lines 584 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // Exit if accessed directly.
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit;
5 }
6
7 /**
8 * Disable Application Passwords.
9 *
10 * If the 'ns_shield_app_passwords' option is enabled, this function disables
11 * the Application Passwords feature by hooking into 'wp_is_application_passwords_available'
12 * and returning false.
13 *
14 * @return void
15 */
16 function ns_shield_disable_app_passwords() {
17 if ( get_option( 'ns_shield_app_passwords' ) ) {
18 add_filter( 'wp_is_application_passwords_available', '__return_false' );
19 }
20 }
21 add_action( 'init', 'ns_shield_disable_app_passwords' );
22