wp_cache_is_enabled()
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
wp_cache_is_enabled();
Код wp_cache_is_enabled() wp cache is enabled WPSCache 1.12.4
function wp_cache_is_enabled() { global $wp_cache_config_file; if ( get_option( 'gzipcompression' ) ) { echo '<strong>' . __( 'Warning', 'wp-super-cache' ) . '</strong>: ' . __( 'GZIP compression is enabled in WordPress, wp-cache will be bypassed until you disable gzip compression.', 'wp-super-cache' ); return false; } $lines = file( $wp_cache_config_file ); foreach ( $lines as $line ) { if ( preg_match( '/^\s*\$cache_enabled\s*=\s*true\s*;/', $line ) ) { return true; } } return false; }