advanced-cache.php 749 Bytes
Newer Older
root's avatar
root committed
1
<?php
ale's avatar
ale committed
2
# WP SUPER CACHE 1.2
root's avatar
root committed
3
function wpcache_broken_message() {
ale's avatar
ale committed
4 5 6 7
	global $wp_cache_config_file;
	if ( isset( $wp_cache_config_file ) == false )
		return '';

root's avatar
root committed
8
	if ( false == strpos( $_SERVER[ 'REQUEST_URI' ], 'wp-admin' ) )
ale's avatar
ale committed
9
		echo "<!-- WP Super Cache is installed but broken. The constant WPCACHEHOME must be set in the file wp-config.php and point at the WP Super Cache plugin directory. -->";
root's avatar
root committed
10 11
}

ale's avatar
ale committed
12 13 14 15
if ( false == defined( 'WPCACHEHOME' ) ) {
	define( 'ADVANCEDCACHEPROBLEM', 1 );
} elseif ( !include_once( WPCACHEHOME . 'wp-cache-phase1.php' ) ) {
	if ( !@is_file( WPCACHEHOME . 'wp-cache-phase1.php' ) ) {
root's avatar
root committed
16 17 18
		define( 'ADVANCEDCACHEPROBLEM', 1 );
	}
}
ale's avatar
ale committed
19 20
if ( defined( 'ADVANCEDCACHEPROBLEM' ) )
	register_shutdown_function( 'wpcache_broken_message' );
root's avatar
root committed
21
?>