updated plugin W3 Total Cache version 2.3.3

This commit is contained in:
2023-06-28 12:45:56 +00:00
committed by Gitium
parent 7d5eef77cf
commit aa3da0eb92
129 changed files with 17998 additions and 186 deletions

View File

@ -399,6 +399,8 @@ class Generic_Plugin_Admin {
/**
* Define icon styles for the custom post type.
*
* @throws \Exception Exception.
*/
public function admin_head() {
global $wp_version;
@ -407,14 +409,27 @@ class Generic_Plugin_Admin {
$page = Util_Request::get_string( 'page', null );
if ( ( ! is_multisite() || is_super_admin() ) && false !== strpos( $page, 'w3tc' ) && 'w3tc_setup_guide' !== $page && ! get_site_option( 'w3tc_setupguide_completed' ) ) {
$config = new Config();
$state_master = Dispatcher::config_state_master();
if ( ! $config->get_boolean( 'pgcache.enabled' ) && $state_master->get_integer( 'common.install' ) > strtotime( 'NOW - 1 WEEK' ) ) {
if ( ! $this->_config->get_boolean( 'pgcache.enabled' ) && $state_master->get_integer( 'common.install' ) > strtotime( 'NOW - 1 WEEK' ) ) {
wp_safe_redirect( esc_url( network_admin_url( 'admin.php?page=w3tc_setup_guide' ) ) );
}
}
if ( empty( $this->_config->get_integer( 'pgcache.migrated.qsexempts' ) ) ) {
$pgcache_accept_qs = array_unique( array_merge( $this->_config->get_array( 'pgcache.accept.qs' ), PgCache_QsExempts::get_qs_exempts() ) );
sort( $pgcache_accept_qs );
$this->_config->set( 'pgcache.accept.qs', $pgcache_accept_qs );
$this->_config->set( 'pgcache.migrated.qsexempts', time() );
// Save the config if the environment is ready; filesystem needs to be writable.
try {
$this->_config->save();
} catch ( \Exception $e ) {
$this->_config->set( 'pgcache.migrated.qsexempts', null );
}
}
if ( 'w3tc_dashboard' === $page ) {
?>
<script type="text/javascript">