wp-super-cache
Last commit date
assets
1 year ago
inc
1 year ago
js
1 year ago
languages
2 years ago
partials
1 year ago
plugins
3 years ago
rest
2 years ago
src
3 years ago
styling
1 year ago
vendor
1 year ago
CHANGELOG.md
1 year ago
LICENSE.txt
3 years ago
README.md
2 years ago
SECURITY.md
2 years ago
advanced-cache.php
2 years ago
composer.json
1 year ago
composer.lock
1 year ago
ossdl-cdn.php
2 years ago
package.json
1 year ago
readme.txt
1 year ago
wp-cache-base.php
2 years ago
wp-cache-config-sample.php
4 years ago
wp-cache-phase1.php
2 years ago
wp-cache-phase2.php
1 year ago
wp-cache.php
1 year ago
advanced-cache.php
30 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 | |
| 9 | $doing_ajax = defined( 'DOING_AJAX' ) && DOING_AJAX; |
| 10 | $xmlrpc_request = defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST; |
| 11 | $rest_request = defined( 'REST_REQUEST' ) && REST_REQUEST; |
| 12 | $robots_request = strpos( $_SERVER['REQUEST_URI'], 'robots.txt' ) != false; |
| 13 | |
| 14 | $skip_output = ( $doing_ajax || $xmlrpc_request || $rest_request || $robots_request ); |
| 15 | if ( false == strpos( $_SERVER['REQUEST_URI'], 'wp-admin' ) && ! $skip_output ) { |
| 16 | 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. -->'; |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | if ( false == defined( 'WPCACHEHOME' ) ) { |
| 21 | define( 'ADVANCEDCACHEPROBLEM', 1 ); |
| 22 | } elseif ( ! include_once WPCACHEHOME . 'wp-cache-phase1.php' ) { |
| 23 | if ( ! @is_file( WPCACHEHOME . 'wp-cache-phase1.php' ) ) { |
| 24 | define( 'ADVANCEDCACHEPROBLEM', 1 ); |
| 25 | } |
| 26 | } |
| 27 | if ( defined( 'ADVANCEDCACHEPROBLEM' ) ) { |
| 28 | register_shutdown_function( 'wpcache_broken_message' ); |
| 29 | } |
| 30 |