[CodeFactor] Apply fixes to commit 7e3b1f2

[ci skip] [skip ci]
This commit is contained in:
codefactor-io 2020-03-26 14:11:33 +00:00
parent 7e3b1f2601
commit bd796ad047
31 changed files with 960 additions and 793 deletions

View file

@ -29,13 +29,14 @@ class MainWP_Child_Pagespeed {
}
public function __construct() {
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
require_once ABSPATH . 'wp-admin/includes/plugin.php';
if ( is_plugin_active( 'google-pagespeed-insights/google-pagespeed-insights.php' ) ) {
$this->is_plugin_installed = true;
}
if (!$this->is_plugin_installed)
if (!$this->is_plugin_installed) {
return;
}
add_filter( 'mainwp-site-sync-others-data', array( $this, 'syncOthersData' ), 10, 2 );
@ -75,8 +76,9 @@ class MainWP_Child_Pagespeed {
}
public function init() {
if (!$this->is_plugin_installed)
if (!$this->is_plugin_installed) {
return;
}
if ( get_option( 'mainwp_pagespeed_hide_plugin' ) === 'hide' ) {
add_filter( 'all_plugins', array( $this, 'hide_plugin' ) );