wpsc_identify_advanced_cache()
Identify the advanced cache plugin used
No Hooks.
Return
String
. The name of the advanced cache plugin, BOOST, WPSC or OTHER.
Usage
wpsc_identify_advanced_cache();
wpsc_identify_advanced_cache() wpsc identify advanced cache code WPSCache 1.12.4
function wpsc_identify_advanced_cache() { global $wpsc_advanced_cache_filename; if ( ! file_exists( $wpsc_advanced_cache_filename ) ) { return 'NONE'; } $contents = file_get_contents( $wpsc_advanced_cache_filename ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents if ( false !== str_contains( $contents, 'Boost Cache Plugin' ) ) { return 'BOOST'; } if ( str_contains( $contents, 'WP SUPER CACHE 0.8.9.1' ) || str_contains( $contents, 'WP SUPER CACHE 1.2' ) ) { return 'WPSC'; } return 'OTHER'; }