mirror of
https://github.com/mainwp/mainwp-child.git
synced 2025-09-01 03:58:07 +08:00
Ref
This commit is contained in:
parent
834965392f
commit
f1eb44e98c
1 changed files with 4 additions and 8 deletions
|
@ -572,8 +572,7 @@ class MainWP_Backup {
|
||||||
public function add_config() {
|
public function add_config() {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
$plugins = array();
|
$plugins = array();
|
||||||
$dir = WP_CONTENT_DIR . '/plugins/';
|
$dir = WP_CONTENT_DIR . '/plugins/';
|
||||||
// phpcs:disable
|
|
||||||
$fh = opendir( $dir );
|
$fh = opendir( $dir );
|
||||||
while ( $entry = readdir( $fh ) ) {
|
while ( $entry = readdir( $fh ) ) {
|
||||||
if ( ! is_dir( $dir . $entry ) ) {
|
if ( ! is_dir( $dir . $entry ) ) {
|
||||||
|
@ -584,12 +583,10 @@ class MainWP_Backup {
|
||||||
}
|
}
|
||||||
$plugins[] = $entry;
|
$plugins[] = $entry;
|
||||||
}
|
}
|
||||||
closedir( $fh );
|
closedir( $fh );
|
||||||
// phpcs:enable
|
|
||||||
|
|
||||||
$themes = array();
|
$themes = array();
|
||||||
$dir = WP_CONTENT_DIR . '/themes/';
|
$dir = WP_CONTENT_DIR . '/themes/';
|
||||||
// phpcs:disable
|
|
||||||
$fh = opendir( $dir );
|
$fh = opendir( $dir );
|
||||||
while ( $entry = readdir( $fh ) ) {
|
while ( $entry = readdir( $fh ) ) {
|
||||||
if ( ! is_dir( $dir . $entry ) ) {
|
if ( ! is_dir( $dir . $entry ) ) {
|
||||||
|
@ -600,8 +597,7 @@ class MainWP_Backup {
|
||||||
}
|
}
|
||||||
$themes[] = $entry;
|
$themes[] = $entry;
|
||||||
}
|
}
|
||||||
closedir( $fh );
|
closedir( $fh );
|
||||||
// phpcs:enable
|
|
||||||
|
|
||||||
if ( defined( 'MAINWP_CHILD_DEBUG' ) && MAINWP_CHILD_DEBUG ) {
|
if ( defined( 'MAINWP_CHILD_DEBUG' ) && MAINWP_CHILD_DEBUG ) {
|
||||||
$string = wp_json_encode(
|
$string = wp_json_encode(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue