eturn mixed */ public static function delete( $option_name ) { $func = self::$use_local_options ? 'delete_option' : 'delete_site_option'; return $func( self::format_option_name( $option_name ) ); } /** * Setup main options */ public static function sanitize_options() { $simple_int_options = array( 'allowed_retries', 'lockout_duration', 'valid_duration', 'allowed_lockouts', 'long_duration', 'notify_email_after' ); foreach ( $simple_int_options as $option ) { $val = self::get( $option ); if ( (int) $val != $val || (int) $val <= 0 ) { self::update( $option, 1 ); } } if ( self::get( 'notify_email_after' ) > self::get( 'allowed_lockouts' ) ) { self::update( 'notify_email_after', self::get( 'allowed_lockouts' ) ); } $args = explode( ',', self::get( 'lockout_notify' ) ); $args_allowed = explode( ',', LLA_LOCKOUT_NOTIFY_ALLOWED ); $new_args = array_intersect( $args, $args_allowed ); self::update( 'lockout_notify', implode( ',', $new_args ) ); $client_type = self::get( 'client_type' ); if ( $client_type != LLA_DIRECT_ADDR && $client_type != LLA_PROXY_ADDR ) { self::update( 'client_type', LLA_DIRECT_ADDR ); } } /** * @param $option_name * * @return string */ private static function is_autoload( $option_name ) { return in_array( trim( $option_name ), self::$disable_autoload_options ) ? 'no' : 'yes'; } }