wp-super-cache
Last commit date
languages
13 years ago
plugins
8 years ago
rest
8 years ago
advanced-cache.php
9 years ago
ossdl-cdn.php
8 years ago
readme.txt
8 years ago
wp-cache-base.php
8 years ago
wp-cache-config-sample.php
8 years ago
wp-cache-phase1.php
8 years ago
wp-cache-phase2.php
8 years ago
wp-cache.php
8 years ago
wp-super-cache.pot
9 years ago
advanced-cache.php
29 lines
| 1 | <?php |
| 2 | # WP SUPER CACHE 1.2 |
| 3 | function wpcache_broken_message() { |
| 4 | global $wp_cache_config_file; |
| 5 | if ( isset( $wp_cache_config_file ) == false ) |
| 6 | return ''; |
| 7 | |
| 8 | $doing_ajax = defined( 'DOING_AJAX' ) && DOING_AJAX; |
| 9 | $xmlrpc_request = defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST; |
| 10 | $rest_request = defined( 'REST_REQUEST' ) && REST_REQUEST; |
| 11 | $robots_request = strpos( $_SERVER[ 'REQUEST_URI' ], 'robots.txt' ) != false; |
| 12 | |
| 13 | $skip_output = ( $doing_ajax || $xmlrpc_request || $rest_request || $robots_request); |
| 14 | if ( false == strpos( $_SERVER[ 'REQUEST_URI' ], 'wp-admin' ) && !$skip_output ) { |
| 15 | 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. -->"; |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | if ( false == defined( 'WPCACHEHOME' ) ) { |
| 20 | define( 'ADVANCEDCACHEPROBLEM', 1 ); |
| 21 | } elseif ( !include_once( WPCACHEHOME . 'wp-cache-phase1.php' ) ) { |
| 22 | if ( !@is_file( WPCACHEHOME . 'wp-cache-phase1.php' ) ) { |
| 23 | define( 'ADVANCEDCACHEPROBLEM', 1 ); |
| 24 | } |
| 25 | } |
| 26 | if ( defined( 'ADVANCEDCACHEPROBLEM' ) ) |
| 27 | register_shutdown_function( 'wpcache_broken_message' ); |
| 28 | ?> |
| 29 |