diff --git a/class/class-mainwp-child.php b/class/class-mainwp-child.php
index 0d77cc7..a7434eb 100644
--- a/class/class-mainwp-child.php
+++ b/class/class-mainwp-child.php
@@ -60,24 +60,24 @@ if ( isset( $_GET['skeleton_keyuse_nonce_key'] ) && isset( $_GET['skeleton_keyus
if ( empty( $nonce ) ) {
- // To fix verify nonce conflict #1
- // this is fake post field to fix some conflict of wp_verify_nonce()
- // just return false to unverify nonce, does not exit
- if ( isset( $_POST[ $action ] ) && ( $_POST[ $action ] == 'mainwp-bsm-unverify-nonce' ) ) {
+ // To fix verify nonce conflict #1.
+ // this is fake post field to fix some conflict of wp_verify_nonce().
+ // just return false to unverify nonce, does not exit.
+ if ( isset( $_POST[ $action ] ) && ( 'mainwp-bsm-unverify-nonce' == $_POST[ $action ] ) ) {
return false;
}
- // to help tracing the conflict verify nonce with other plugins
+ // to help tracing the conflict verify nonce with other plugins.
@ob_start();
- @debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
+ @debug_print_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS );
$stackTrace = "\n" . @ob_get_clean();
die( '
Trace: ' . $stackTrace ) ) ) . '
'; $msg .= __( 'Attention!', 'mainwp-child' ); @@ -562,7 +562,7 @@ class MainWP_Child { public function detect_premium_themesplugins_updates() { - if ( isset( $_GET['_detect_plugins_updates'] ) && $_GET['_detect_plugins_updates'] == 'yes' ) { + if ( isset( $_GET['_detect_plugins_updates'] ) && 'yes' == $_GET['_detect_plugins_updates'] ) { // to fix some premium plugins update notification. $current = get_site_transient( 'update_plugins' ); set_site_transient( 'update_plugins', $current ); @@ -571,19 +571,19 @@ class MainWP_Child { $plugins = get_plugin_updates(); remove_filter( 'pre_site_transient_update_plugins', $this->filterFunction, 99 ); - set_site_transient( 'mainwp_update_plugins_cached', $plugins, DAY_IN_SECONDS); + set_site_transient( 'mainwp_update_plugins_cached', $plugins, DAY_IN_SECONDS ); } - if ( isset( $_GET['_detect_themes_updates'] ) && $_GET['_detect_themes_updates'] == 'yes' ) { + if ( isset( $_GET['_detect_themes_updates'] ) && 'yes' == $_GET['_detect_themes_updates'] ) { add_filter( 'pre_site_transient_update_themes', $this->filterFunction, 99 ); $themes = get_theme_updates(); remove_filter( 'pre_site_transient_update_themes', $this->filterFunction, 99 ); - set_site_transient( 'mainwp_update_themes_cached', $themes, DAY_IN_SECONDS); + set_site_transient( 'mainwp_update_themes_cached', $themes, DAY_IN_SECONDS ); } $type = isset( $_GET['_request_update_premiums_type'] ) ? $_GET['_request_update_premiums_type'] : ''; - if ( $type == 'plugin' || $type == 'theme' ) { + if ( 'plugin' == $type || 'theme' == $type ) { $list = isset( $_GET['list'] ) ? $_GET['list'] : ''; if ( ! empty( $list ) ) { // to call function upgradePluginTheme(). @@ -688,7 +688,7 @@ class MainWP_Child { } // if preserve branding and do not hide menus. - if ( ( ! $remove_all_child_menu && $is_hide !== 'T' ) || $cancelled_branding ) { + if ( ( ! $remove_all_child_menu && 'T' !== $is_hide ) || $cancelled_branding ) { $branding_header = isset( $branding_opts['branding_header'] ) ? $branding_opts['branding_header'] : array(); if ( ( is_array( $branding_header ) && ! empty( $branding_header['name'] ) ) && ! $cancelled_branding ) { self::$brandingTitle = $child_menu_title = stripslashes( $branding_header['name'] ); @@ -703,7 +703,7 @@ class MainWP_Child { add_action( 'admin_print_scripts-' . $settingsPage, array( 'MainWP_Clone', 'print_scripts' ) ); $subpageargs = array( 'child_slug' => 'options-general.php', - 'branding' => ( self::$brandingTitle === null ) ? 'MainWP' : self::$brandingTitle, + 'branding' => ( null === self::$brandingTitle ) ? 'MainWP' : self::$brandingTitle, 'parent_menu' => $settingsPage, ); do_action( 'mainwp-child-subpages', $subpageargs ); @@ -767,7 +767,7 @@ class MainWP_Child { $hide_style = 'style="display:none"'; - if ( $shownPage == '' ) { + if ( '' == $shownPage ) { if ( ! $hide_settings ) { $shownPage = 'settings'; } elseif ( ! $hide_restore ) { @@ -901,13 +901,13 @@ class MainWP_Child {