updated plugin W3 Total Cache version 2.6.1

This commit is contained in:
2023-12-08 23:23:32 +00:00
committed by Gitium
parent fa428d9da9
commit 33d18af972
82 changed files with 5759 additions and 1701 deletions

View File

@ -53,7 +53,7 @@ class UserExperience_DeferScripts_Extension {
return;
}
Util_Bus::add_ob_callback( 'lazyload', array( $this, 'ob_callback' ) );
Util_Bus::add_ob_callback( 'deferscripts', array( $this, 'ob_callback' ) );
add_filter( 'w3tc_minify_js_script_tags', array( $this, 'w3tc_minify_js_script_tags' ) );
add_filter( 'w3tc_save_options', array( $this, 'w3tc_save_options' ) );
@ -289,6 +289,19 @@ class UserExperience_DeferScripts_Extension {
return $data;
}
/**
* Gets the enabled status of the extension.
*
* @since 2.5.1
*
* @return bool
*/
public static function is_enabled() {
$config = Dispatcher::config();
$extensions_active = $config->get_array( 'extensions.active' );
return Util_Environment::is_w3tc_pro( $config ) && array_key_exists( 'user-experience-defer-scripts', $extensions_active );
}
}
$o = new UserExperience_DeferScripts_Extension();