diff --git a/class/class-mainwp-child-branding.php b/class/class-mainwp-child-branding.php index bf769c8..cb8f75f 100644 --- a/class/class-mainwp-child-branding.php +++ b/class/class-mainwp-child-branding.php @@ -666,7 +666,7 @@ class MainWP_Child_Branding { echo ''; } } - + /** * PARSE * Parses some CSS into an array @@ -760,7 +760,7 @@ class MainWP_Child_Branding { } return $output; } - + public function custom_the_generator( $generator, $type = '' ) { $extra_setting = $this->get_extra_options(); if ( isset( $extra_setting['site_generator'] ) ) { diff --git a/class/class-mainwp-child-server-information-render.php b/class/class-mainwp-child-server-information-render.php index 4fb812a..00a3abf 100644 --- a/class/class-mainwp-child-server-information-render.php +++ b/class/class-mainwp-child-server-information-render.php @@ -524,7 +524,7 @@ class MainWP_Child_Server_Information_Render { Warning'; } } - + private function render_php_settings_rows() { ?> @@ -844,13 +844,13 @@ class MainWP_Child_Server_Information_Render { $branding_title = 'MainWP'; } $branding_title .= ' Upload Directory'; - - $path = ''; + + $path = ''; $message = 'Writable'; - + MainWP_Child_Server_Information::check_mainwp_directory( $message, $path ); - - self::render_directory_row( $branding_title, $path, 'Writable', $message, true ); + + self::render_directory_row( $branding_title, $path, 'Writable', $message, true ); } protected static function render_directory_row( $pName, $pDirectory, $pCheck, $pResult, $pPassed ) { @@ -906,7 +906,7 @@ class MainWP_Child_Server_Information_Render { } return ' Fail'; } - + /* *Plugin-Name: Error Log Dashboard Widget *Plugin URI: http://wordpress.org/extend/plugins/error-log-dashboard-widget/ diff --git a/class/class-mainwp-child-server-information.php b/class/class-mainwp-child-server-information.php index 3f41e3d..8a7316d 100644 --- a/class/class-mainwp-child-server-information.php +++ b/class/class-mainwp-child-server-information.php @@ -2,7 +2,7 @@ namespace MainWP\Child; class MainWP_Child_Server_Information { - + /** * Method get_class_name() * @@ -72,8 +72,8 @@ class MainWP_Child_Server_Information { return $i; } - public function check_mainwp_directory( &$message = '', &$path = '' ) { - $path = ''; + public function check_mainwp_directory( &$message = '', &$path = '' ) { + $path = ''; try { $dirs = MainWP_Helper::get_mainwp_dir( null, false ); $path = $dirs[0]; @@ -82,9 +82,9 @@ class MainWP_Child_Server_Information { return false; } - if ( ! is_dir( dirname( $path ) ) ) { + if ( ! is_dir( dirname( $path ) ) ) { $message = 'Directory not found'; - return false; + return false; } $hasWPFileSystem = MainWP_Helper::get_wp_filesystem(); @@ -92,20 +92,20 @@ class MainWP_Child_Server_Information { global $wp_filesystem; if ( $hasWPFileSystem && ! empty( $wp_filesystem ) ) { - if ( ! $wp_filesystem->is_writable( $path ) ) { + if ( ! $wp_filesystem->is_writable( $path ) ) { $message = 'Directory not writable'; return false; } } else { if ( ! is_writable( $path ) ) { $message = 'Directory not writable'; - return false; + return false; } } $message = 'Writable'; - return true; + return true; } - + public static function check( $pCompare, $pVersion, $pGetter, $pExtraCompare = null, $pExtraVersion = null, $sizeCompare = false ) { $currentVersion = call_user_func( array( self::get_class_name(), $pGetter ) ); @@ -115,7 +115,7 @@ class MainWP_Child_Server_Information { return ( version_compare( $currentVersion, $pVersion, $pCompare ) || ( ( null !== $pExtraCompare ) && version_compare( $currentVersion, $pExtraVersion, $pExtraCompare ) ) ); } } - + public static function filesize_compare( $value1, $value2, $operator = null ) { if ( false !== strpos( $value1, 'G' ) ) { $value1 = preg_replace( '/[A-Za-z]/', '', $value1 ); @@ -132,8 +132,8 @@ class MainWP_Child_Server_Information { } return version_compare( $value1, $value2, $operator ); - } - + } + public static function get_curl_support() { return function_exists( 'curl_version' ); } @@ -181,7 +181,7 @@ class MainWP_Child_Server_Information { sort( $extensions ); echo esc_html( implode( ', ', $extensions ) ); } - + public static function get_file_system_method() { if ( defined( 'MAINWP_SAVE_FS_METHOD' ) ) { return MAINWP_SAVE_FS_METHOD; @@ -189,8 +189,8 @@ class MainWP_Child_Server_Information { $fs = get_filesystem_method(); return $fs; - } - + } + public static function get_current_version() { $currentVersion = get_option( 'mainwp_child_plugin_version' ); diff --git a/class/class-mainwp-child-staging.php b/class/class-mainwp-child-staging.php index 799d0fb..80205e6 100644 --- a/class/class-mainwp-child-staging.php +++ b/class/class-mainwp-child-staging.php @@ -82,13 +82,13 @@ class MainWP_Child_Staging { MainWP_Helper::write( array( 'error' => __( 'Please install WP Staging plugin on child website', 'mainwp-child' ) ) ); } - if (!class_exists( 'WPStaging\WPStaging' )){ + if ( ! class_exists( 'WPStaging\WPStaging' ) ) { if ( file_exists( WPSTG_PLUGIN_DIR . 'app/Core/WPStaging.php' ) ) { require_once WPSTG_PLUGIN_DIR . 'app/Core/WPStaging.php'; - } else if ( file_exists( WPSTG_PLUGIN_DIR . "Core/WPStaging.php" ) ) { - require_once WPSTG_PLUGIN_DIR . "Core/WPStaging.php"; - } - } + } elseif ( file_exists( WPSTG_PLUGIN_DIR . 'Core/WPStaging.php' ) ) { + require_once WPSTG_PLUGIN_DIR . 'Core/WPStaging.php'; + } + } \WPStaging\WPStaging::getInstance(); $information = array(); @@ -243,8 +243,8 @@ class MainWP_Child_Staging { ob_start(); if ( file_exists( WPSTG_PLUGIN_DIR . 'app/Backend/views/clone/ajax/start.php' ) ) { require_once WPSTG_PLUGIN_DIR . 'app/Backend/views/clone/ajax/start.php'; - } else if ( file_exists( WPSTG_PLUGIN_DIR . "Backend/views/clone/ajax/start.php" ) ) { - require_once WPSTG_PLUGIN_DIR . "Backend/views/clone/ajax/start.php"; + } elseif ( file_exists( WPSTG_PLUGIN_DIR . 'Backend/views/clone/ajax/start.php' ) ) { + require_once WPSTG_PLUGIN_DIR . 'Backend/views/clone/ajax/start.php'; } $result = ob_get_clean(); return $result; @@ -343,8 +343,8 @@ class MainWP_Child_Staging { ob_start(); if ( file_exists( WPSTG_PLUGIN_DIR . 'app/Backend/views/clone/ajax/update.php' ) ) { require_once WPSTG_PLUGIN_DIR . 'app/Backend/views/clone/ajax/update.php'; - } else if ( file_exists( WPSTG_PLUGIN_DIR . "Backend/views/clone/ajax/update.php" ) ) { - require_once WPSTG_PLUGIN_DIR . "Backend/views/clone/ajax/update.php"; + } elseif ( file_exists( WPSTG_PLUGIN_DIR . 'Backend/views/clone/ajax/update.php' ) ) { + require_once WPSTG_PLUGIN_DIR . 'Backend/views/clone/ajax/update.php'; } $result = ob_get_clean(); return $result; diff --git a/class/class-mainwp-client-report.php b/class/class-mainwp-client-report.php index c89fb00..eb86011 100644 --- a/class/class-mainwp-client-report.php +++ b/class/class-mainwp-client-report.php @@ -5,7 +5,7 @@ namespace MainWP\Child; class MainWP_Client_Report { public static $instance = null; - + /** * Get Class Name. * @@ -14,7 +14,7 @@ class MainWP_Client_Report { public static function get_class_name() { return __CLASS__; } - + public static function instance() { if ( null === self::$instance ) { self::$instance = new self(); diff --git a/class/class-mainwp-pages.php b/class/class-mainwp-pages.php index f6ce4df..5379286 100644 --- a/class/class-mainwp-pages.php +++ b/class/class-mainwp-pages.php @@ -251,7 +251,7 @@ class MainWP_Pages {
> - +
ID; @@ -600,7 +600,7 @@ class MainWP_Utility { return false; } - + public static function update_lasttime_backup( $by, $time ) { $backup_by = array( 'backupbuddy', 'backupwordpress', 'backwpup', 'updraftplus', 'wptimecapsule' ); if ( ! in_array( $by, $backup_by ) ) {