From f1eb44e98c3bdc737ddd3835a6ccef3e6bfeee2a Mon Sep 17 00:00:00 2001 From: thanghv Date: Sat, 23 May 2020 00:48:46 +0700 Subject: [PATCH] Ref --- class/class-mainwp-backup.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/class/class-mainwp-backup.php b/class/class-mainwp-backup.php index 6be40a5..2f53f61 100644 --- a/class/class-mainwp-backup.php +++ b/class/class-mainwp-backup.php @@ -572,8 +572,7 @@ class MainWP_Backup { public function add_config() { global $wpdb; $plugins = array(); - $dir = WP_CONTENT_DIR . '/plugins/'; - // phpcs:disable + $dir = WP_CONTENT_DIR . '/plugins/'; $fh = opendir( $dir ); while ( $entry = readdir( $fh ) ) { if ( ! is_dir( $dir . $entry ) ) { @@ -584,12 +583,10 @@ class MainWP_Backup { } $plugins[] = $entry; } - closedir( $fh ); - // phpcs:enable + closedir( $fh ); $themes = array(); - $dir = WP_CONTENT_DIR . '/themes/'; - // phpcs:disable + $dir = WP_CONTENT_DIR . '/themes/'; $fh = opendir( $dir ); while ( $entry = readdir( $fh ) ) { if ( ! is_dir( $dir . $entry ) ) { @@ -600,8 +597,7 @@ class MainWP_Backup { } $themes[] = $entry; } - closedir( $fh ); - // phpcs:enable + closedir( $fh ); if ( defined( 'MAINWP_CHILD_DEBUG' ) && MAINWP_CHILD_DEBUG ) { $string = wp_json_encode(