wpsc_is_boost_compatible()
Check if Jetpack Boost is compatible with WP Super Cache.
No Hooks.
Return
true|false
.
Usage
wpsc_is_boost_compatible();
wpsc_is_boost_compatible() wpsc is boost compatible code WPSCache 1.12.4
function wpsc_is_boost_compatible() { if ( ! empty( $GLOBALS['wp_cache_mobile_enabled'] ) ) { return false; } if ( isset( $GLOBALS['wp_super_cache_late_init'] ) && $GLOBALS['wp_super_cache_late_init'] === 1 ) { return false; } if ( ! empty( $GLOBALS['wpsc_rejected_cookies'] ) ) { return false; } if ( isset( $GLOBALS['wp_cache_not_logged_in'] ) && $GLOBALS['wp_cache_not_logged_in'] !== 2 ) { return false; } if ( isset( $GLOBALS['wp_cache_preload_on'] ) && $GLOBALS['wp_cache_preload_on'] === 1 ) { return false; } if ( ! empty( $GLOBALS['wp_cache_no_cache_for_get'] ) ) { return false; } if ( ! empty( $GLOBALS['wpsc_save_headers'] ) ) { return false; } if ( isset( $GLOBALS['wp_cache_make_known_anon'] ) && $GLOBALS['wp_cache_make_known_anon'] === 1 ) { return false; } if ( ! empty( $GLOBALS['wp_cache_mfunc_enabled'] ) ) { return false; } if ( isset( $GLOBALS['wp_cache_clear_on_post_edit'] ) && $GLOBALS['wp_cache_clear_on_post_edit'] === 1 ) { return false; } if ( ! empty( $GLOBALS['wp_cache_front_page_checks'] ) ) { return false; } if ( is_array( $GLOBALS['wp_cache_pages'] ) && array_sum( $GLOBALS['wp_cache_pages'] ) ) { return false; } $default_cache_acceptable_files = array( 'wp-comments-popup.php', 'wp-links-opml.php', 'wp-locations.php' ); if ( is_array( $GLOBALS['cache_acceptable_files'] ) && array_diff( $GLOBALS['cache_acceptable_files'], $default_cache_acceptable_files ) ) { return false; } $default_cache_rejected_uri = array( 'wp-.*\\.php', 'index\\.php' ); if ( is_array( $GLOBALS['cache_rejected_uri'] ) && array_diff( $GLOBALS['cache_rejected_uri'], $default_cache_rejected_uri ) ) { return false; } if ( is_array( $GLOBALS['cache_rejected_user_agent'] ) && array_diff( $GLOBALS['cache_rejected_user_agent'], array( '' ) ) ) { return false; } return true; }