diff --git a/class/class-mainwp-child-ithemes-security.php b/class/class-mainwp-child-ithemes-security.php index 89e80f9..34101a4 100644 --- a/class/class-mainwp-child-ithemes-security.php +++ b/class/class-mainwp-child-ithemes-security.php @@ -1,10 +1,9 @@ is_plugin_installed = true; } @@ -39,15 +38,15 @@ class MainWP_Child_iThemes_Security { add_filter( 'mainwp-site-sync-others-data', array( $this, 'syncOthersData' ), 10, 2 ); } - // ok - function syncOthersData( $information, $data = array() ) { + + public function syncOthersData( $information, $data = array() ) { if ( is_array( $data ) && isset( $data['ithemeExtActivated'] ) && ( 'yes' === $data['ithemeExtActivated'] ) ) { try { $information['syncIThemeData'] = array( 'users_and_roles' => $this->get_available_admin_users_and_roles(), ); } catch ( Exception $e ) { - error_log($e->getMessage()); + error_log( $e->getMessage() ); } } return $information; @@ -55,7 +54,7 @@ class MainWP_Child_iThemes_Security { public function action() { $information = array(); - if ( ! class_exists( 'ITSEC_Core' ) || ! class_exists('ITSEC_Modules') ) { + if ( ! class_exists( 'ITSEC_Core' ) || ! class_exists( 'ITSEC_Modules' ) ) { $information['error'] = 'NO_ITHEME'; MainWP_Helper::write( $information ); } @@ -122,7 +121,7 @@ class MainWP_Child_iThemes_Security { MainWP_Helper::write( $information ); } - function set_showhide() { + public function set_showhide() { $hide = isset( $_POST['showhide'] ) && ( 'hide' === $_POST['showhide'] ) ? 'hide' : ''; MainWP_Helper::update_option( 'mainwp_ithemes_hide_plugin', $hide ); $information['result'] = 'success'; @@ -135,12 +134,12 @@ class MainWP_Child_iThemes_Security { return; } - if ( get_option( 'mainwp_ithemes_hide_plugin' ) === 'hide' ) { + if ( 'hide' === get_option( 'mainwp_ithemes_hide_plugin' ) ) { add_filter( 'all_plugins', array( $this, 'all_plugins' ) ); add_action( 'admin_menu', array( $this, 'remove_menu' ) ); add_action( 'admin_init', array( $this, 'admin_init' ) ); add_action( 'admin_head', array( &$this, 'custom_admin_css' ) ); - if ( isset($_GET['page']) && ( $_GET['page'] == 'itsec' || $_GET['page'] == 'itsec-security-check' ) ) { + if ( isset( $_GET['page'] ) && ( 'itsec' == $_GET['page'] || 'itsec-security-check' == $_GET['page'] ) ) { wp_redirect( get_option( 'siteurl' ) . '/wp-admin/index.php' ); exit(); } @@ -166,7 +165,7 @@ class MainWP_Child_iThemes_Security { remove_menu_page( 'itsec' ); } - function custom_admin_css() { + public function custom_admin_css() { ?>