wp_super_cache_disable() WPSCache 1.0
Хуков нет.
Возвращает
Null. Ничего.
Использование
wp_super_cache_disable();
Код wp_super_cache_disable() wp super cache disable WPSCache 1.7.1
function wp_super_cache_disable() {
global $cache_path, $supercachedir, $wp_cache_config_file, $super_cache_enabled;
if ( ! $super_cache_enabled ) {
wp_cache_debug( 'wp_super_cache_disable: already disabled' );
return true;
}
wp_cache_setting( 'super_cache_enabled', false );
wp_cache_debug( 'wp_super_cache_disable: disable cache' );
$super_cache_enabled = false;
if ( is_dir( $supercachedir ) ) {
@rename( $supercachedir, $supercachedir . '.disabled' );
}
sleep( 1 ); // allow existing processes to write to the supercachedir and then delete it
if ( function_exists( 'prune_super_cache' ) && is_dir( $supercachedir ) ) {
prune_super_cache( $cache_path, true );
}
if ( $GLOBALS['wp_cache_mod_rewrite'] === 1 ) {
remove_mod_rewrite_rules();
}
}