[CodeFactor] Apply fixes to commit b588a4c

[ci skip] [skip ci]
This commit is contained in:
codefactor-io 2020-04-23 15:06:40 +00:00
parent b588a4cc16
commit 1ad59af2fb
2 changed files with 3 additions and 3 deletions

View file

@ -374,7 +374,7 @@ class MainWP_Clone {
$quick_dirs = array();
$quick_dirs[] = array( __( 'Site Root', 'mainwp-child' ), ABSPATH );
$quick_dirs[] = array( __( 'Backup', 'mainwp-child' ), $backup_dir );
$uploads = wp_upload_dir();
$uploads = wp_upload_dir();
if ( $uploads && false === $uploads['error'] ) {
$quick_dirs[] = array( __( 'Uploads Folder', 'mainwp-child' ), $uploads['path'] );
}

View file

@ -424,8 +424,8 @@ class MainWP_Helper {
} else {
$length = 12;
$include_standard_special_chars = false;
$random_password = wp_generate_password( $length, $include_standard_special_chars );
$post_author = wp_create_user( $post_author, $random_password, $post_author . '@asdf.com' );
$random_password = wp_generate_password( $length, $include_standard_special_chars );
$post_author = wp_create_user( $post_author, $random_password, $post_author . '@asdf.com' );
}
}
} elseif ( isset( $new_post['custom_post_author'] ) && ! empty( $new_post['custom_post_author'] ) ) {