/** * Enable the WP Super Cache. */ function enable($args = array(), $assoc_args = array()) { global $super_cache_enabled; wp_super_cache_enable(); if ($super_cache_enabled) { WP_CLI::success('The WP Super Cache is enabled.'); } else { WP_CLI::error('The WP Super Cache is not enabled, check its settings page for more info.'); } }
/** * Enable the WP Super Cache * * @param array $args * @param array $vars */ function enable($args = array(), $vars = array()) { if (function_exists('wp_super_cache_enable')) { global $super_cache_enabled; wp_super_cache_enable(); if ($super_cache_enabled) { WP_CLI::success('The WP Super Cache is enabled.'); } else { WP_CLI::error('The WP Super Cache is not enabled, check its settings page for more info.'); } } else { WP_CLI::error('The WP Super Cache could not be found, is it installed?'); } }
function wp_cache_enable() { global $wp_cache_config_file, $cache_enabled, $supercachedir; if (get_option('gzipcompression')) { echo "<b>Error: GZIP compression is enabled, disable it if you want to enable wp-cache.</b><br /><br />"; return false; } if (wp_cache_replace_line('^ *\\$cache_enabled', '$cache_enabled = true;', $wp_cache_config_file)) { $cache_enabled = true; } wp_super_cache_enable(); }
function wp_cache_enable() { global $wp_cache_config_file, $cache_enabled, $supercachedir; if (get_option('gzipcompression')) { echo "<strong>" . __('Error: GZIP compression is enabled. Disable it if you want to enable wp-cache.', 'wp-super-cache') . "</strong>"; return false; } if (wp_cache_replace_line('^ *\\$cache_enabled', '$cache_enabled = true;', $wp_cache_config_file)) { $cache_enabled = true; } wp_super_cache_enable(); }