mirror of
https://github.com/mainwp/mainwp-child.git
synced 2025-09-05 09:19:53 +08:00
parent
7e3b1f2601
commit
bd796ad047
31 changed files with 960 additions and 793 deletions
|
@ -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' ) );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue