mirror of
https://github.com/mainwp/mainwp-child.git
synced 2025-09-01 03:58:07 +08:00
Merge pull request #142 from mainwp/bogdan01-cf-autofix
Apply fixes from CodeFactor
This commit is contained in:
commit
f2bf358b3a
2 changed files with 8 additions and 8 deletions
|
@ -905,8 +905,8 @@ class MainWP_Child {
|
|||
MainWP_Connect::instance()->check_login();
|
||||
}
|
||||
|
||||
private function parse_init_extensions() {
|
||||
// Handle fatal errors for those init if needed.
|
||||
private function parse_init_extensions() {
|
||||
// Handle fatal errors for those init if needed.
|
||||
MainWP_Child_Branding::instance()->branding_init();
|
||||
MainWP_Client_Report::instance()->creport_init();
|
||||
\MainWP_Child_IThemes_Security::instance()->ithemes_init();
|
||||
|
@ -917,7 +917,7 @@ class MainWP_Child {
|
|||
\MainWP_Child_Back_Up_Buddy::instance();
|
||||
\MainWP_Child_Wordfence::instance()->wordfence_init();
|
||||
\MainWP_Child_Timecapsule::instance()->init();
|
||||
\MainWP_Child_Staging::instance()->init();
|
||||
\MainWP_Child_Staging::instance()->init();
|
||||
\MainWP_Child_Pagespeed::instance()->init();
|
||||
\MainWP_Child_Links_Checker::instance()->init();
|
||||
\MainWP_Child_WPvivid_BackupRestore::instance()->init();
|
||||
|
|
|
@ -167,8 +167,8 @@ class MainWP_Helper {
|
|||
|
||||
/** @var $wp_filesystem WP_Filesystem_Base */
|
||||
global $wp_filesystem;
|
||||
MainWP_Helper::get_wp_filesystem();
|
||||
|
||||
self::get_wp_filesystem();
|
||||
|
||||
include_once ABSPATH . 'wp-admin/includes/file.php';
|
||||
$upload_dir = wp_upload_dir();
|
||||
add_filter( 'http_request_args', array( self::get_class_name(), 'reject_unsafe_urls' ), 99, 2 );
|
||||
|
@ -290,8 +290,8 @@ class MainWP_Helper {
|
|||
public static function get_mainwp_dir( $what = null, $dieOnError = true ) {
|
||||
/** @var $wp_filesystem WP_Filesystem_Base */
|
||||
global $wp_filesystem;
|
||||
MainWP_Helper::get_wp_filesystem();
|
||||
|
||||
self::get_wp_filesystem();
|
||||
|
||||
$upload_dir = wp_upload_dir();
|
||||
$dir = $upload_dir['basedir'] . DIRECTORY_SEPARATOR . 'mainwp' . DIRECTORY_SEPARATOR;
|
||||
self::check_dir( $dir, $dieOnError );
|
||||
|
@ -322,7 +322,7 @@ class MainWP_Helper {
|
|||
public static function check_dir( $dir, $dieOnError, $chmod = 0755 ) {
|
||||
self::get_wp_filesystem();
|
||||
global $wp_filesystem;
|
||||
|
||||
|
||||
if ( ! file_exists( $dir ) ) {
|
||||
if ( empty( $wp_filesystem ) ) {
|
||||
mkdir( $dir, $chmod, true );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue