| Server IP : 23.94.149.180 / Your IP : 216.73.216.147 Web Server : nginx/1.20.1 System : Linux deadrock 5.14.0-741.22.1.el9_9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Nov 12 15:18:14 UTC 2026 x86_64 User : apache ( 48) PHP Version : 8.6.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /files/webmaint/corey/website/wp-content/plugins/jetpack-boost/compatibility/ |
Upload File : |
<?php
/**
* Super Cache compatibility for Boost
*
* @package automattic/jetpack-boost
*/
namespace Automattic\Jetpack_Boost\Compatibility\Super_Cache;
/**
* Add WP Super Cache bypass query param to the URL.
*
* @param string $url The URL.
*/
function add_bypass_query_param( $url ) {
global $cache_page_secret;
return add_query_arg( 'donotcachepage', $cache_page_secret, $url );
}
/**
* Add WP Super Cache bypass query params to Critical CSS URLs.
*
* @param array $urls list of URLs to generate Critical CSS for.
*/
function critical_css_bypass_super_cache( $urls ) {
return array_map( __NAMESPACE__ . '\add_bypass_query_param', $urls );
}
add_filter( 'jetpack_boost_critical_css_urls', __NAMESPACE__ . '\critical_css_bypass_super_cache' );
/**
* Clear Super Cache's cache. Called when Critical CSS finishes generating, or
* when a module is enabled or disabled.
*/
function clear_cache() {
global $wpdb;
if ( function_exists( 'wp_cache_clear_cache' ) ) {
wp_cache_clear_cache( $wpdb->blogid );
}
// Remove the action so it doesn't run again during the same request.
remove_action( 'jetpack_boost_page_output_changed', __NAMESPACE__ . '\clear_cache' );
}
add_action( 'jetpack_boost_page_output_changed', __NAMESPACE__ . '\clear_cache' );