本文整理汇总了PHP中w3tc_pgcache_flush函数的典型用法代码示例。如果您正苦于以下问题:PHP w3tc_pgcache_flush函数的具体用法?PHP w3tc_pgcache_flush怎么用?PHP w3tc_pgcache_flush使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了w3tc_pgcache_flush函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: ccfm_clear_cache_for_me
/**
* Clear the caches!
*/
function ccfm_clear_cache_for_me($source)
{
global $wp_fastest_cache;
do_action('ccfm_clear_cache_for_me_before', $source);
// if W3 Total Cache is being used, clear the cache
if (function_exists('w3tc_pgcache_flush')) {
w3tc_pgcache_flush();
} else {
if (function_exists('wp_cache_clean_cache')) {
global $file_prefix, $supercachedir;
if (empty($supercachedir) && function_exists('get_supercache_dir')) {
$supercachedir = get_supercache_dir();
}
wp_cache_clean_cache($file_prefix);
} else {
if (class_exists('WpeCommon')) {
//be extra careful, just in case 3rd party changes things on us
if (method_exists('WpeCommon', 'purge_memcached')) {
WpeCommon::purge_memcached();
}
if (method_exists('WpeCommon', 'purge_memcached')) {
WpeCommon::clear_maxcdn_cache();
}
if (method_exists('WpeCommon', 'purge_memcached')) {
WpeCommon::purge_varnish_cache();
}
} else {
if (method_exists('WpFastestCache', 'deleteCache') && !empty($wp_fastest_cache)) {
$wp_fastest_cache->deleteCache();
}
}
}
}
do_action('ccfm_clear_cache_for_me', $source);
}
开发者ID:Ezyva2015,项目名称:money101.com.au,代码行数:38,代码来源:clear-cache-for-widgets.php
示例2: flush
/**
* Clear something from the cache
*
* @param array $args
* @param array $vars
*/
function flush($args = array(), $vars = array())
{
if (function_exists('w3tc_pgcache_flush')) {
$args = array_unique($args);
do {
$cache_type = array_shift($args);
switch ($cache_type) {
case 'db':
case 'database':
if (w3tc_dbcache_flush()) {
WP_CLI::success('The object cache is flushed successfully.');
} else {
WP_CLI::error('Flushing the object cache failed.');
}
break;
case 'minify':
if (w3tc_minify_flush()) {
WP_CLI::success('The object cache is flushed successfully.');
} else {
WP_CLI::error('Flushing the object cache failed.');
}
break;
case 'object':
if (w3tc_objectcache_flush()) {
WP_CLI::success('The object cache is flushed successfully.');
} else {
WP_CLI::error('Flushing the object cache failed.');
}
break;
case 'post':
default:
if (isset($vars['post_id'])) {
if (is_numeric($vars['post_id'])) {
w3tc_pgcache_flush_post($vars['post_id']);
} else {
WP_CLI::error('This is not a valid post id.');
}
w3tc_pgcache_flush_post($vars['post_id']);
} elseif (isset($vars['permalink'])) {
$id = url_to_postid($vars['permalink']);
if (is_numeric($id)) {
w3tc_pgcache_flush_post($id);
} else {
WP_CLI::error('There is no post with this permalink.');
}
} else {
if (isset($flushed_page_cache) && $flushed_page_cache) {
break;
}
$flushed_page_cache = true;
w3tc_pgcache_flush();
}
}
} while (!empty($args));
} else {
WP_CLI::error('The W3 Total Cache could not be found, is it installed?');
}
}
开发者ID:roelven,项目名称:wp-cli,代码行数:64,代码来源:total-cache.php
示例3: clear_cache
/**
* Clears the cache
*/
function clear_cache()
{
if (function_exists('w3tc_pgcache_flush')) {
w3tc_pgcache_flush();
} else {
if (function_exists('wp_cache_clear_cache')) {
wp_cache_clear_cache();
}
}
}
开发者ID:BGCX067,项目名称:eyesimple-svn-to-git,代码行数:13,代码来源:class-admin.php
示例4: nrelate_flush_w3tc_cache
/**
* Clean third party plugins cache
*
* Since v0.50.0
*/
function nrelate_flush_w3tc_cache($msg = '')
{
// Flush Total Cache
// @cred: http://wordpress.org/extend/plugins/wordpress-seo/
if (function_exists('w3tc_pgcache_flush')) {
w3tc_pgcache_flush();
$msg .= __(' & W3 Total Cache Page Cache flushed');
}
return $msg;
}
开发者ID:jeanpage,项目名称:ca_learn,代码行数:15,代码来源:common.php
示例5: mt_clear_cache
public static function mt_clear_cache()
{
global $file_prefix;
if (function_exists('w3tc_pgcache_flush')) {
w3tc_pgcache_flush();
}
if (function_exists('wp_cache_clean_cache')) {
wp_cache_clean_cache($file_prefix, true);
}
}
开发者ID:jeremybradbury,项目名称:wp-ninja-kit,代码行数:10,代码来源:maintenance.php
示例6: clear_cache
function clear_cache()
{
if (function_exists('wp_cache_clear_cache')) {
ob_end_clean();
wp_cache_clear_cache();
}
if (function_exists('w3tc_pgcache_flush')) {
ob_end_clean();
w3tc_pgcache_flush();
}
nocache_headers();
}
开发者ID:nayabbukhari,项目名称:circulocristiano,代码行数:12,代码来源:class-cspv4.php
示例7: csmm_render_template
/**
* Required functions for the plugin.
*
* @link http://www.69signals.com
* @since 1.0
* @package Signals_Maintenance_Mode
*/
function csmm_render_template($options)
{
// Fix for W3 Total Cache plugin
if (function_exists('wp_cache_clear_cache')) {
ob_end_clean();
wp_cache_clear_cache();
}
// Fix for WP Super Cache plugin
if (function_exists('w3tc_pgcache_flush')) {
ob_end_clean();
w3tc_pgcache_flush();
}
/**
* Using the nocache_headers() to ensure that different nocache headers are sent to different browsers.
* We don't want any browser to cache the maintainance page.
* Also, output buffering is turned on.
*/
nocache_headers();
ob_start();
// Checking for options required for the plugin
if (empty($options['title'])) {
$options['title'] = __('Maintainance Mode', 'signals');
}
if (empty($options['input_text'])) {
$options['input_text'] = __('Enter your email address..', 'signals');
}
if (empty($options['button_text'])) {
$options['button_text'] = __('Subscribe', 'signals');
}
// Response message
if (empty($options['message_noemail'])) {
$options['message_noemail'] = __('Oops! Something went wrong.', 'signals');
}
if (empty($options['message_subscribed'])) {
$options['message_subscribed'] = __('You are already subscribed!', 'signals');
}
if (empty($options['message_wrong'])) {
$options['message_wrong'] = __('Oops! Something went wrong.', 'signals');
}
if (empty($options['message_done'])) {
$options['message_done'] = __('Thank you! We\'ll be in touch!', 'signals');
}
// Template file
if ('1' == $options['disable_settings']) {
require_once SIGNALS_CSMM_PATH . 'framework/public/views/blank.php';
} else {
require_once SIGNALS_CSMM_PATH . 'framework/public/views/html.php';
}
ob_flush();
exit;
}
开发者ID:narendra-addweb,项目名称:MyImmoPix,代码行数:58,代码来源:functions.php
示例8: clear_pagecache
/**
* Clear full page cache
*/
public function clear_pagecache()
{
/**
* Clear full page cache from active plugin modules
*/
foreach ($this->active_modules as $module) {
$module->clear_pagecache();
}
/**
* Other cache clear methods
*/
if (function_exists('w3tc_pgca che_flush')) {
w3tc_pgcache_flush();
} else {
if (function_exists('wp_cache_clear_cache')) {
wp_cache_clear_cache();
}
}
}
开发者ID:optimalisatie,项目名称:above-the-fold-optimization,代码行数:22,代码来源:plugins.class.php
示例9: clear_caches
/**
* Clear caches.
*
* Clears popular WordPress caching mechanisms.
*
* @since 4.0.0
*
* @param bool $page [optional] true to clear page cache
*
* @return void
*/
public static function clear_caches($page = false)
{
//clear APC Cache
if (function_exists('apc_store')) {
apc_clear_cache();
//Let's clear APC (if it exists) when big stuff is saved.
}
//clear w3 total cache or wp super cache
if (function_exists('w3tc_pgcache_flush')) {
if (true == $page) {
w3tc_pgcache_flush();
w3tc_minify_flush();
}
w3tc_dbcache_flush();
w3tc_objectcache_flush();
} else {
if (function_exists('wp_cache_clear_cache') && true == $page) {
wp_cache_clear_cache();
}
}
}
开发者ID:waynestedman,项目名称:commodore-new,代码行数:32,代码来源:class-itsec-lib.php
示例10: flatsome_maintenance_mode_on_deactivation
function flatsome_maintenance_mode_on_deactivation()
{
if (!current_user_can('activate_plugins')) {
return;
}
$plugin = isset($_REQUEST['plugin']) ? $_REQUEST['plugin'] : '';
check_admin_referer("deactivate-plugin_{$plugin}");
// Clear Cachify Cache
if (has_action('cachify_flush_cache')) {
do_action('cachify_flush_cache');
}
// Clear Super Cache
if (function_exists('wp_cache_clear_cache')) {
ob_end_clean();
wp_cache_clear_cache();
}
// Clear W3 Total Cache
if (function_exists('w3tc_pgcache_flush')) {
ob_end_clean();
w3tc_pgcache_flush();
}
}
开发者ID:bqevin,项目名称:wp-shopeasy,代码行数:22,代码来源:global.php
示例11: _flush_caching_plugins_caches
/**
* Flush the caches of the plugins W3 Total Cache, WP Super Cache, Cachify, and Quick Cache.
*
* @since 1.0.0
*/
public function _flush_caching_plugins_caches()
{
/**
* Filter whether the caches of common caching plugins shall be flushed.
*
* @since 1.0.0
*
* @param bool $flush Whether caches of caching plugins shall be flushed. Default true.
*/
if (!apply_filters('tablepress_flush_caching_plugins_caches', true)) {
return;
}
// W3 Total Cache
if (function_exists('w3tc_pgcache_flush')) {
w3tc_pgcache_flush();
}
// WP Super Cache
if (function_exists('wp_cache_clear_cache')) {
wp_cache_clear_cache();
}
// Cachify
do_action('cachify_flush_cache');
// Quick Cache
if (isset($GLOBALS['quick_cache']) && method_exists($GLOBALS['quick_cache'], 'clear_cache')) {
$GLOBALS['quick_cache']->clear_cache();
}
// WP Fastest Cache
if (isset($GLOBALS['wp_fastest_cache']) && method_exists($GLOBALS['wp_fastest_cache'], 'deleteCache')) {
$GLOBALS['wp_fastest_cache']->deleteCache();
}
}
开发者ID:akumanu,项目名称:wordpress-gk,代码行数:36,代码来源:model-table.php
示例12: load_form_page
public function load_form_page()
{
wp_enqueue_script('postbox');
$upload_dir = wp_upload_dir();
// returns assoc array with path info
$user_opts = $this->p->addons['util']['user']->get_options();
if (!empty($_GET['action'])) {
if (empty($_GET[NGFB_NONCE])) {
$this->p->debug->log('Nonce token validation query field missing.');
} elseif (!wp_verify_nonce($_GET[NGFB_NONCE], $this->get_nonce())) {
$this->p->notice->err(__('Nonce token validation failed for plugin action (action ignored).', NGFB_TEXTDOM));
} else {
switch ($_GET['action']) {
case 'check_for_updates':
if (!empty($this->p->options['plugin_' . $this->p->cf['lca'] . '_tid'])) {
$this->readme_info = array();
$this->p->update->check_for_updates(null, true);
}
break;
case 'clear_all_cache':
$deleted_cache = $this->p->util->delete_expired_file_cache(true);
$deleted_transient = $this->p->util->delete_expired_transients(true);
wp_cache_flush();
if (function_exists('w3tc_pgcache_flush')) {
w3tc_pgcache_flush();
} elseif (function_exists('wp_cache_clear_cache')) {
wp_cache_clear_cache();
}
$this->p->notice->inf(__('Cached files, WP object cache, transient cache, and any additional caches, ' . 'like APC, Memcache, Xcache, W3TC, Super Cache, etc. have all been cleared.', NGFB_TEXTDOM));
break;
case 'clear_metabox_prefs':
NgfbUser::delete_metabox_prefs(get_current_user_id());
break;
case 'change_display_options':
if (isset($this->p->cf['form']['display_options'][$_GET['display_options']])) {
$this->p->options['plugin_display'] = $_GET['display_options'];
}
$this->p->opt->save_options(NGFB_OPTIONS_NAME, $this->p->options);
break;
}
}
}
// the plugin information metabox on all settings pages needs this
$this->p->admin->set_readme_info($this->feed_cache_expire());
// add child metaboxes first, since they contain the default reset_metabox_prefs()
$this->p->admin->submenu[$this->menu_id]->add_meta_boxes();
if (empty($this->p->options['plugin_' . $this->p->cf['lca'] . '_tid']) || !$this->p->check->aop()) {
add_meta_box($this->pagehook . '_purchase', __('Pro Version', NGFB_TEXTDOM), array(&$this, 'show_metabox_purchase'), $this->pagehook, 'side');
add_filter('postbox_classes_' . $this->pagehook . '_' . $this->pagehook . '_purchase', array(&$this, 'add_class_postbox_highlight_side'));
$this->p->addons['util']['user']->reset_metabox_prefs($this->pagehook, array('purchase'), null, 'side', true);
}
add_meta_box($this->pagehook . '_help', __('Help and Support', NGFB_TEXTDOM), array(&$this, 'show_metabox_help'), $this->pagehook, 'side');
add_meta_box($this->pagehook . '_info', __('Version Information', NGFB_TEXTDOM), array(&$this, 'show_metabox_info'), $this->pagehook, 'side');
add_meta_box($this->pagehook . '_status_gpl', __('Standard Features', NGFB_TEXTDOM), array(&$this, 'show_metabox_status_gpl'), $this->pagehook, 'side');
add_meta_box($this->pagehook . '_status_pro', __('Pro Features', NGFB_TEXTDOM), array(&$this, 'show_metabox_status_pro'), $this->pagehook, 'side');
}
开发者ID:coollog,项目名称:theboola,代码行数:56,代码来源:admin.php
示例13: qppr_try_to_clear_cache_plugins
/**
* Try to clear Cache files when certain plugins are present.
* Only happens after redirects or settings are saved or deleted.
*
* Expirimental to try to stop some caching plugins from holding the cached redirects.
* @since 5.1.2
*/
function qppr_try_to_clear_cache_plugins()
{
// make sure the function is present
if (!function_exists('is_plugin_active')) {
require_once ABSPATH . '/wp-admin/includes/plugin.php';
}
// WP Super Cache
if (is_plugin_active('wp-super-cache/wp-cache.php') && function_exists('wp_cache_clear_cache')) {
wp_cache_clear_cache();
}
// W3 Total Cache
if (is_plugin_active('w3-total-cache/w3-total-cache.php') && function_exists('w3tc_pgcache_flush')) {
w3tc_pgcache_flush();
}
// WP Fast Cache
if (is_plugin_active('wp-fastest-cache/wpFastestCache.php') && class_exists('WpFastestCache')) {
$newCache = new WpFastestCache();
$newCache->deleteCache();
}
}
开发者ID:kol4ak,项目名称:autoiservice,代码行数:27,代码来源:page_post_redirect_plugin.php
示例14: admin_header
/**
* Generates the header for admin pages
*
* @param string $title The title to show in the main heading.
* @param bool $form Whether or not the form should be included.
* @param string $option The long name of the option to use for the current page.
* @param string $optionshort The short name of the option to use for the current page.
* @param bool $contains_files Whether the form should allow for file uploads.
*/
function admin_header($title, $form = true, $option = 'yoast_wpseo_options', $optionshort = 'wpseo', $contains_files = false)
{
?>
<div class="wrap">
<?php
if (isset($_GET['updated']) && $_GET['updated'] == 'true' || isset($_GET['settings-updated']) && $_GET['settings-updated'] == 'true') {
$msg = __('Settings updated', 'wordpress-seo');
if (function_exists('w3tc_pgcache_flush')) {
w3tc_pgcache_flush();
$msg .= __(' & W3 Total Cache Page Cache flushed', 'wordpress-seo');
} else {
if (function_exists('wp_cache_clear_cache')) {
wp_cache_clear_cache();
$msg .= __(' & WP Super Cache flushed', 'wordpress-seo');
}
}
// flush rewrite rules if XML sitemap settings have been updated.
if (isset($_GET['page']) && 'wpseo_xml' == $_GET['page']) {
flush_rewrite_rules();
}
echo '<div id="message" style="width:94%;" class="message updated"><p><strong>' . $msg . '.</strong></p></div>';
}
?>
<a href="http://yoast.com/">
<div id="yoast-icon"
style="background: url('<?php
echo WPSEO_URL;
?>
images/wordpress-SEO-32x32.png') no-repeat;"
class="icon32">
<br/>
</div>
</a>
<h2 id="wpseo-title"><?php
_e("Yoast WordPress SEO: ", 'wordpress-seo');
echo $title;
?>
</h2>
<div id="wpseo_content_top" class="postbox-container" style="width:75%;">
<div class="metabox-holder">
<div class="meta-box-sortables">
<?php
if ($form) {
echo '<form action="' . admin_url('options.php') . '" method="post" id="wpseo-conf"' . ($contains_files ? ' enctype="multipart/form-data"' : '') . '>';
settings_fields($option);
$this->currentoption = $optionshort;
}
}
开发者ID:Savantos,项目名称:cow-theme,代码行数:57,代码来源:class-config.php
示例15: save_settings
function save_settings()
{
$options = get_option($this->optionname);
if (isset($_REQUEST['reset']) && $_REQUEST['reset'] == "true" && isset($_REQUEST['plugin']) && $_REQUEST['plugin'] == 'google-analytics-for-wordpress') {
$options = $this->set_defaults();
$options['msg'] = "<div class=\"updated\"><p>" . __('Google Analytics settings reset.') . "</p></div>\n";
} elseif (isset($_POST['submit']) && isset($_POST['plugin']) && $_POST['plugin'] == 'google-analytics-for-wordpress') {
if (!current_user_can('manage_options')) {
die(__('You cannot edit the Google Analytics for WordPress options.'));
}
check_admin_referer('analyticspp-config');
foreach (array('uastring', 'dlextensions', 'domainorurl', 'position', 'domain', 'customcode', 'ga_token', 'extraseurl', 'gajsurl', 'gfsubmiteventpv', 'trackprefix', 'ignore_userlevel', 'internallink', 'internallinklabel', 'primarycrossdomain', 'othercrossdomains') as $option_name) {
if (isset($_POST[$option_name])) {
$options[$option_name] = $_POST[$option_name];
} else {
$options[$option_name] = '';
}
}
foreach (array('extrase', 'trackoutbound', 'admintracking', 'trackadsense', 'allowanchor', 'allowlinker', 'allowhash', 'rsslinktagging', 'advancedsettings', 'trackregistration', 'theme_updated', 'cv_loggedin', 'cv_authorname', 'cv_category', 'cv_all_categories', 'cv_tags', 'cv_year', 'cv_post_type', 'outboundpageview', 'downloadspageview', 'trackcrossdomain', 'gajslocalhosting', 'manual_uastring', 'taggfsubmit', 'wpec_tracking', 'shopp_tracking', 'anonymizeip', 'trackcommentform', 'debug', 'firebuglite', 'yoast_tracking') as $option_name) {
if (isset($_POST[$option_name]) && $_POST[$option_name] == 'on') {
$options[$option_name] = true;
} else {
$options[$option_name] = false;
}
}
if (isset($_POST['manual_uastring']) && isset($_POST['uastring_man'])) {
$options['uastring'] = $_POST['uastring_man'];
}
if ($options['trackcrossdomain']) {
if (!$options['allowlinker']) {
$options['allowlinker'] = true;
}
if (empty($options['primarycrossdomain'])) {
$origin = GA_Filter::ga_get_domain($_SERVER["HTTP_HOST"]);
$options['primarycrossdomain'] = $origin["domain"];
}
}
if (function_exists('w3tc_pgcache_flush')) {
w3tc_pgcache_flush();
}
if (function_exists('w3tc_dbcache_flush')) {
w3tc_dbcache_flush();
}
if (function_exists('w3tc_minify_flush')) {
w3tc_minify_flush();
}
if (function_exists('w3tc_objectcache_flush')) {
w3tc_objectcache_flush();
}
if (function_exists('wp_cache_clear_cache')) {
wp_cache_clear_cache();
}
$options['msg'] = "<div id=\"updatemessage\" class=\"updated fade\"><p>Google Analytics <strong>settings updated</strong>.</p></div>\n";
$options['msg'] .= "<script type=\"text/javascript\">setTimeout(function(){jQuery('#updatemessage').hide('slow');}, 3000);</script>";
}
update_option($this->optionname, $options);
}
开发者ID:marqui678,项目名称:finalchance.Panopta,代码行数:57,代码来源:googleanalytics.php
示例16: w3_config_save
//.........这里部分代码省略.........
}
}
if ($current_config->get_boolean('newrelic.enabled')) {
if ($current_config->get_boolean('pgcache.enabled')) {
if (w3_is_network() && $current_config->get_boolean('common.force_master')) {
$new_config->set('pgcache.late_init', true);
}
}
}
do_action('w3tc_saved_options', $new_config, $new_config_admin);
/**
* Save config
*/
try {
$new_config_admin->save();
$new_config->save();
} catch (Exception $ex) {
// try to fix environment, it potentially can be fixed silently
// dont show error here, it will be called again later
// in admin_notices
try {
$environment = w3_instance('W3_AdminEnvironment');
$environment->fix_in_wpadmin($new_config);
} catch (Exception $ex) {
}
// retry save process and complain now on failure
try {
$new_config_admin->save();
$new_config->save();
} catch (Exception $ex) {
throw new Exception('<strong>Can\'t change configuration</strong>: ' . $ex->getMessage());
}
}
$w3_plugin_cdn = w3_instance('W3_Plugin_CdnAdmin');
/**
* Empty caches on engine change or cache enable/disable
*/
if ($old_config->get_string('pgcache.engine') != $new_config->get_string('pgcache.engine') || $old_config->get_string('pgcache.enabled') != $new_config->get_string('pgcache.enabled')) {
w3tc_pgcache_flush();
}
if ($old_config->get_string('dbcache.engine') != $new_config->get_string('dbcache.engine') || $old_config->get_string('dbcache.enabled') != $new_config->get_string('dbcache.enabled')) {
w3tc_dbcache_flush();
}
if ($old_config->get_string('objectcache.engine') != $new_config->get_string('objectcache.engine') || $old_config->get_string('objectcache.enabled') != $new_config->get_string('objectcache.enabled')) {
w3tc_objectcache_flush();
}
if ($old_config->get_string('minify.engine') != $new_config->get_string('minify.engine') || $old_config->get_string('minify.enabled') != $new_config->get_string('minify.enabled')) {
w3tc_minify_flush();
}
/**
* Update CloudFront CNAMEs
*/
$update_cf_cnames = false;
if ($new_config->get_boolean('cdn.enabled') && in_array($new_config->get_string('cdn.engine'), array('cf', 'cf2'))) {
if ($new_config->get_string('cdn.engine') == 'cf') {
$old_cnames = $old_config->get_array('cdn.cf.cname');
$new_cnames = $new_config->get_array('cdn.cf.cname');
} else {
$old_cnames = $old_config->get_array('cdn.cf2.cname');
$new_cnames = $new_config->get_array('cdn.cf2.cname');
}
if (count($old_cnames) != count($new_cnames) || count(array_diff($old_cnames, $new_cnames))) {
$update_cf_cnames = true;
}
}
/**
* Refresh config
*/
$current_config->load();
/**
* React to config changes
*/
$environment = w3_instance('W3_AdminEnvironment');
$environment->fix_on_event($new_config, 'config_change', $old_config);
/**
* Update support us option
*/
w3_instance('W3_AdminLinks')->link_update($current_config);
/**
* Auto upload minify files to CDN
*/
if ($new_config->get_boolean('minify.enabled') && $new_config->get_boolean('minify.upload') && $new_config->get_boolean('cdn.enabled') && !w3_is_cdn_mirror($new_config->get_string('cdn.engine'))) {
w3_cdn_upload_minify();
}
/**
* Auto upload browsercache files to CDN
*/
if ($new_config->get_boolean('cdn.enabled') && $new_config->get_string('cdn.engine') == 'ftp') {
w3_cdn_delete_browsercache($current_config);
w3_cdn_upload_browsercache($current_config);
}
/**
* Update CloudFront CNAMEs
*/
if ($update_cf_cnames) {
$error = null;
$w3_plugin_cdn->update_cnames($error);
}
return true;
}
开发者ID:easinewe,项目名称:Avec2016,代码行数:101,代码来源:admin.php
示例17: clearCache
public function clearCache()
{
if (SAM_WPSC) {
global $blog_cache_dir, $wp_cache_object_cache;
if ($wp_cache_object_cache) {
reset_oc_version();
} else {
prune_super_cache($blog_cache_dir, true);
prune_super_cache(get_supercache_dir(), true);
}
return __('Cache of WP Super Cache plugin is flushed.', SAM_DOMAIN);
} elseif (SAM_W3TC) {
if (function_exists('w3tc_pgcache_flush')) {
w3tc_pgcache_flush();
}
if (function_exists('w3tc_dbcache_flush')) {
w3tc_dbcache_flush();
}
return __('Cache of W3 Total Cache plugin is flushed.', SAM_DOMAIN);
} else {
return '';
}
}
开发者ID:venturepact,项目名称:blog,代码行数:23,代码来源:admin.class.php
示例18: w3tc_flush
public function w3tc_flush($flushAll = false)
{
if ($flushAll) {
if (function_exists('w3tc_pgcache_flush')) {
w3tc_pgcache_flush();
}
if (function_exists('w3tc_dbcache_flush')) {
w3tc_dbcache_flush();
}
}
if (function_exists('w3tc_objectcache_flush')) {
w3tc_objectcache_flush();
}
}
开发者ID:tconte252,项目名称:haute-inhabit,代码行数:14,代码来源:Helper.php
示例19: autoptimize_flush_pagecache
function autoptimize_flush_pagecache($nothing)
{
if (function_exists('wp_cache_clear_cache')) {
if (is_multisite()) {
$blog_id = get_current_blog_id();
wp_cache_clear_cache($blog_id);
} else {
wp_cache_clear_cache();
}
} else {
if (has_action('cachify_flush_cache')) {
do_action('cachify_flush_cache');
} else {
if (function_exists('w3tc_pgcache_flush')) {
w3tc_pgcache_flush();
// w3 total cache
} else {
if (function_exists('hyper_cache_invalidate')) {
hyper_cache_invalidate();
// hypercache
} else {
if (function_exists('wp_fast_cache_bulk_delete_all')) {
wp_fast_cache_bulk_delete_all();
// wp fast cache
} else {
if (class_exists("WpFastestCache")) {
$wpfc = new WpFastestCache();
// wp fastest cache
$wpfc->deleteCache();
} else {
if (class_exists("c_ws_plugin__qcache_purging_routines")) {
c_ws_plugin__qcache_purging_routines::purge_cache_dir();
// quick cache
} else {
if (file_exists(WP_CONTENT_DIR . '/wp-cache-config.php') && function_exists('prune_super_cache')) {
// fallback for WP-Super-Cache
global $cache_path;
if (is_multisite()) {
$blog_id = get_current_blog_id();
prune_super_cache(get_supercache_dir($blog_id), true);
prune_super_cache($cache_path . 'blogs/', true);
} else {
prune_super_cache($cache_path . 'supercache/', true);
prune_super_cache($cache_path, true);
}
}
}
}
}
}
}
}
}
}
开发者ID:junaidkbr,项目名称:autoptimize,代码行数:54,代码来源:autoptimize.php
示例20: upgrade
/**
* Upgrade plugin
*
* @since 2.3.10
*/
public function upgrade()
{
if (!defined('WPABOVETHEFOLD_VERSION') || WPABOVETHEFOLD_VERSION !== get_site_option('wpabovethefold_version')) {
/**
* Clear cache on plugin update
*/
if (function_exists('w3tc_pgcache_flush')) {
w3tc_pgcache_flush();
} else {
if (function_exists('wp_cache_clear_cache')) {
wp_cache_clear_cache();
}
}
update_site_option('wpabovethefold_version', WPABOVETHEFOLD_VERSION);
}
}
开发者ID:ashenkar,项目名称:sanga,代码行数:21,代码来源:admin.class.php
注:本文中的w3tc_pgcache_flush函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论