- Timestamp:
- 12/04/2020 09:42:52 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-application-passwords.php
r49739 r49752 24 24 25 25 /** 26 * The option name used to store whether application passwords is in use. 27 * 28 * @since 5.6.0 29 * 30 * @type string 31 */ 32 const OPTION_KEY_IN_USE = 'using_application_passwords'; 33 34 /** 26 35 * The generated application password length. 27 36 * … … 31 40 */ 32 41 const PW_LENGTH = 24; 42 43 /** 44 * Checks if Application Passwords are being used by the site. 45 * 46 * This returns true if at least one App Password has ever been created. 47 * 48 * @since 5.6.0 49 * 50 * @return bool 51 */ 52 public static function is_in_use() { 53 return (bool) get_site_option( self::OPTION_KEY_IN_USE ); 54 } 33 55 34 56 /** … … 66 88 if ( ! $saved ) { 67 89 return new WP_Error( 'db_error', __( 'Could not save application password.' ) ); 90 } 91 92 if ( ! get_site_option( self::OPTION_KEY_IN_USE ) ) { 93 update_site_option( self::OPTION_KEY_IN_USE, true ); 68 94 } 69 95
Note: See TracChangeset
for help on using the changeset viewer.