Merge pull request #154 from mainwp/bogdan01-cf-autofix

Apply fixes from CodeFactor
This commit is contained in:
Thang Hoang Van 2020-05-21 01:27:54 +07:00 committed by GitHub
commit b4ddb00a69
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 40 additions and 40 deletions

View file

@ -82,11 +82,11 @@ class MainWP_Child_Staging {
MainWP_Helper::write( array( 'error' => __( 'Please install WP Staging plugin on child website', 'mainwp-child' ) ) ); 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' ) ) { if ( file_exists( WPSTG_PLUGIN_DIR . 'app/Core/WPStaging.php' ) ) {
require_once 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" ) ) { } elseif ( file_exists( WPSTG_PLUGIN_DIR . 'Core/WPStaging.php' ) ) {
require_once WPSTG_PLUGIN_DIR . "Core/WPStaging.php"; require_once WPSTG_PLUGIN_DIR . 'Core/WPStaging.php';
} }
} }
@ -243,8 +243,8 @@ class MainWP_Child_Staging {
ob_start(); ob_start();
if ( file_exists( WPSTG_PLUGIN_DIR . 'app/Backend/views/clone/ajax/start.php' ) ) { 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'; 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" ) ) { } elseif ( file_exists( WPSTG_PLUGIN_DIR . 'Backend/views/clone/ajax/start.php' ) ) {
require_once WPSTG_PLUGIN_DIR . "Backend/views/clone/ajax/start.php"; require_once WPSTG_PLUGIN_DIR . 'Backend/views/clone/ajax/start.php';
} }
$result = ob_get_clean(); $result = ob_get_clean();
return $result; return $result;
@ -343,8 +343,8 @@ class MainWP_Child_Staging {
ob_start(); ob_start();
if ( file_exists( WPSTG_PLUGIN_DIR . 'app/Backend/views/clone/ajax/update.php' ) ) { 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'; 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" ) ) { } elseif ( file_exists( WPSTG_PLUGIN_DIR . 'Backend/views/clone/ajax/update.php' ) ) {
require_once WPSTG_PLUGIN_DIR . "Backend/views/clone/ajax/update.php"; require_once WPSTG_PLUGIN_DIR . 'Backend/views/clone/ajax/update.php';
} }
$result = ob_get_clean(); $result = ob_get_clean();
return $result; return $result;