mirror of
https://github.com/mainwp/mainwp-child.git
synced 2025-09-06 09:20:28 +08:00
Refactoring
This commit is contained in:
parent
3a126a6e29
commit
737db8daa2
6 changed files with 245 additions and 224 deletions
|
@ -13,7 +13,7 @@
|
|||
* Extension URL: https://mainwp.com/extension/ithemes-security/
|
||||
*/
|
||||
|
||||
// phpcs:disable PSR1.Classes.ClassDeclaration, WordPress.WP.AlternativeFunctions -- root namespace to use external code.
|
||||
// phpcs:disable -- third party credit code.
|
||||
|
||||
class MainWP_Child_IThemes_Security {
|
||||
public static $instance = null;
|
||||
|
@ -1000,8 +1000,13 @@ class MainWP_Child_IThemes_Security {
|
|||
$active = '';
|
||||
|
||||
}
|
||||
|
||||
$results = $wpdb->get_results( 'SELECT * FROM `' . $wpdb->base_prefix . 'itsec_lockouts`' . $where . $type_statement . $active . ';', ARRAY_A ); // phpcs:ignore -- safe query. $output = array();
|
||||
|
||||
return $this->get_lockouts_int( $results, $type );
|
||||
}
|
||||
|
||||
private function get_lockouts_int( $results, $type ){
|
||||
|
||||
if ( is_array( $results ) && count( $results ) > 0 ) {
|
||||
switch ( $type ) {
|
||||
case 'host':
|
||||
|
@ -1035,10 +1040,11 @@ class MainWP_Child_IThemes_Security {
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $output;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function release_lockout() {
|
||||
global $wpdb;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue