| Server IP : 130.225.57.55 / Your IP : 216.73.216.60 Web Server : Apache System : Linux wp-vhost07 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /srv/www/reco2st.eu/https/wp-content/plugins/w3-total-cache/ |
Upload File : |
<?php
/**
* File: Extension_FragmentCache_Environment.php
*
* @package W3TC
*/
namespace W3TC;
/**
* Class Extension_FragmentCache_Environment
*/
class Extension_FragmentCache_Environment {
/**
* Fixes the fragment cache based on the provided event and configuration.
*
* @param object $w3tc_config Configuration object for the fragment cache.
* @param string $event The event triggering this method.
* @param object|null $old_config Optional previous configuration object.
*
* @return void
*/
public static function fix_on_event( $w3tc_config, $event, $old_config = null ) {
if ( 'file' === $w3tc_config->get_string( array( 'fragmentcache', 'engine' ) ) ) {
if ( ! wp_next_scheduled( 'w3_fragmentcache_cleanup' ) ) {
wp_schedule_event(
time(),
'w3_fragmentcache_cleanup',
'w3_fragmentcache_cleanup'
);
}
} else {
self::unschedule();
}
}
/**
* Deactivates the fragment cache extension.
*
* @return void
*/
public static function deactivate_extension() {
$w3tc_config = Dispatcher::config();
$w3tc_config->set_extension_active_frontend( 'fragmentcache', false );
$w3tc_config->save();
self::unschedule();
}
/**
* Unschedules the fragment cache cleanup event if it is scheduled.
*
* @return void
*/
private static function unschedule() {
if ( wp_next_scheduled( 'w3_fragmentcache_cleanup' ) ) {
wp_clear_scheduled_hook( 'w3_fragmentcache_cleanup' );
}
}
}