diff --git a/comet-cache.php b/comet-cache.php index f8a07d6..238641c 100644 --- a/comet-cache.php +++ b/comet-cache.php @@ -1,6 +1,6 @@ =') || ${__FILE__}['apc_enabled'])) { // If PHP <= 5.4 or APC is enabled @@ -22,8 +22,10 @@ } add_action( - 'all_admin_notices', create_function( - '', 'if(!current_user_can(\'activate_plugins\'))'. + 'all_admin_notices', + create_function( + '', + 'if(!current_user_can(\'activate_plugins\'))'. ' return;'."\n".// User missing capability. 'echo \''.// Wrap `$notice` inside a WordPress error. @@ -33,7 +35,7 @@ ''. '\';' - ) + ) ); } elseif (${__FILE__}['apc_enabled'] && is_admin()) { ${__FILE__}['apc_deprecated_notice'] = '
'.__('To learn more about this change, please see the announcement: PHP APC Extension No Longer Supported', 'comet-cache').'
'; add_action( - 'all_admin_notices', create_function( - '', 'if(!current_user_can(\'activate_plugins\'))'. + 'all_admin_notices', + create_function( + '', + 'if(!current_user_can(\'activate_plugins\'))'. ' return;'."\n".// User missing capability. 'echo \''.// Wrap `$notice` inside a WordPress error. @@ -57,7 +61,7 @@ ''. '\';' - ) + ) ); } } else { // Load the plugin @@ -68,8 +72,10 @@ ${__FILE__}['mbstring_deprecated_warning'] .= ''.__('The mbstring
extension provides Multibyte String support to PHP and is required to properly handle UTF-8 characters, which many sites now use. Without Multibyte String support, Comet Cache will be unstable. For that reason we are requiring the mbstring
extension to improve reliablity when caching and to prevent your site from experiencing unforeseen issues in the future.', 'comet-cache').'
'.__('Dismiss this notice.', 'comet-cache').'
'; add_action( - 'all_admin_notices', create_function( - '', 'if(!current_user_can(\'activate_plugins\'))'. + 'all_admin_notices', + create_function( + '', + 'if(!current_user_can(\'activate_plugins\'))'. ' return;'."\n".// User missing capability. 'echo \''.// Wrap `$notice` inside a WordPress error. ''.__('You don\'t have to use an .htaccess
file to enjoy the performance enhancements provided by this plugin; caching is handled automatically by WordPress/PHP alone. That being said, if you want to take advantage of the additional speed enhancements associated w/ GZIP compression (and we do recommend this), then you WILL need an .htaccess
file to accomplish that part.', 'comet-cache').'
'.sprintf(__('%1$s fully supports GZIP compression on its output. However, it does not handle GZIP compression directly. We purposely left GZIP compression out of this plugin, because GZIP compression is something that should really be enabled at the Apache level or inside your php.ini
file. GZIP compression can be used for things like JavaScript and CSS files as well, so why bother turning it on for only WordPress-generated pages when you can enable GZIP at the server level and cover all the bases!', 'comet-cache'), esc_html(NAME)).'
'.__('If you want to enable GZIP, create an .htaccess
file in your WordPress® installation directory, and put the following few lines in it. Alternatively, if you already have an .htaccess
file, just add these lines to it, and that is all there is to it. GZIP is now enabled in the recommended way! See also: video about GZIP Compression.', 'comet-cache').'
'.esc_html(file_get_contents(dirname(dirname(__FILE__)).'/templates/gzip-htaccess.txt')).'
'."\n";
+ echo ' '.esc_html(file_get_contents(dirname(__DIR__).'/templates/gzip-htaccess.txt')).'
'."\n";
echo ' Or, if your server is missing mod_deflate
/mod_filter
; open your php.ini file and add this line: zlib.output_compression = on
'.sprintf(__('Download your existing options and import them all into another %1$s installation; saves time on future installs.', 'comet-cache'), esc_html(NAME)).'
'."\n"; echo ''.sprintf(__('Woohoo! %1$s activated. :-)', 'comet-cache'), esc_html(NAME)).'
'. - ''.sprintf(__('NOTE: Your ZenCache options were preserved by %1$s (for more details, visit the Migration FAQ).'.'', 'comet-cache'), esc_html(NAME), esc_attr(IS_PRO ? 'http://cometcache.com/r/zencache-pro-migration-faq/' : 'https://cometcache.com/r/zencache-migration-faq/')).'
'. - ''.sprintf(__('To review your configuration, please see: %1$s → Plugin Options.'.'', 'comet-cache'), esc_html(NAME), esc_attr(add_query_arg(urlencode_deep(array('page' => GLOBAL_NS)), self_admin_url('/admin.php')))).'
' + ''.sprintf(__('Woohoo! %1$s activated. :-)', 'comet-cache'), esc_html(NAME)).'
'. + ''.sprintf(__('NOTE: Your ZenCache options were preserved by %1$s (for more details, visit the Migration FAQ).'.'', 'comet-cache'), esc_html(NAME), esc_attr(IS_PRO ? 'http://cometcache.com/r/zencache-pro-migration-faq/' : 'https://cometcache.com/r/zencache-migration-faq/')).'
'. + ''.sprintf(__('To review your configuration, please see: %1$s → Plugin Options.'.'', 'comet-cache'), esc_html(NAME), esc_attr(add_query_arg(urlencode_deep(['page' => GLOBAL_NS]), self_admin_url('/admin.php')))).'
' ); } } - } diff --git a/src/includes/closures/Ac/AbortUtils.php b/src/includes/closures/Ac/AbortUtils.php deleted file mode 100644 index f453261..0000000 --- a/src/includes/closures/Ac/AbortUtils.php +++ /dev/null @@ -1,11 +0,0 @@ -maybeIgnoreUserAbort = function () use ($self) { - -}; diff --git a/src/includes/closures/Ac/AcPluginUtils.php b/src/includes/closures/Ac/AcPluginUtils.php deleted file mode 100644 index b5427af..0000000 --- a/src/includes/closures/Ac/AcPluginUtils.php +++ /dev/null @@ -1,25 +0,0 @@ -loadAcPlugins = function () use ($self) { - if (!is_dir(WP_CONTENT_DIR.'/ac-plugins')) { - return; // Nothing to do here. - } - $GLOBALS[GLOBAL_NS.'_advanced_cache'] = $self; // Self reference. - $GLOBALS[GLOBAL_NS.'__advanced_cache'] = &$GLOBALS[GLOBAL_NS.'_advanced_cache']; - if (!isset($GLOBALS['zencache__advanced_cache'])) { - $GLOBALS['zencache_advanced_cache'] = &$GLOBALS[GLOBAL_NS.'_advanced_cache']; - $GLOBALS['zencache__advanced_cache'] = &$GLOBALS[GLOBAL_NS.'_advanced_cache']; - } - foreach ((array) glob(WP_CONTENT_DIR.'/ac-plugins/*.php') as $_ac_plugin) { - if (is_file($_ac_plugin)) { - include_once $_ac_plugin; - } - } - unset($_ac_plugin); // Houskeeping. -}; diff --git a/src/includes/closures/Ac/BrowserUtils.php b/src/includes/closures/Ac/BrowserUtils.php deleted file mode 100644 index a01229d..0000000 --- a/src/includes/closures/Ac/BrowserUtils.php +++ /dev/null @@ -1,34 +0,0 @@ -maybeStopBrowserCaching = function () use ($self) { - switch ((bool) COMET_CACHE_ALLOW_BROWSER_CACHE) { - - case true: // If global config allows, check exclusions. - - if (isset($_GET[strtolower(SHORT_NAME).'ABC'])) { - if (!filter_var($_GET[strtolower(SHORT_NAME).'ABC'], FILTER_VALIDATE_BOOLEAN)) { - return $self->sendNoCacheHeaders(); // Disallow. - } // Else, allow client-side caching; because `ABC` is a true-ish value. - // ↑ Note that exclusion patterns are ignored in this case, in favor of `ABC`. - } elseif (COMET_CACHE_EXCLUDE_CLIENT_SIDE_URIS && preg_match(COMET_CACHE_EXCLUDE_CLIENT_SIDE_URIS, $_SERVER['REQUEST_URI'])) { - return $self->sendNoCacheHeaders(); // Disallow. - } - return; // Allow browser caching; default behavior in this mode. - - case false: // Global config disallows; check inclusions. - - if (isset($_GET[strtolower(SHORT_NAME).'ABC'])) { - if (filter_var($_GET[strtolower(SHORT_NAME).'ABC'], FILTER_VALIDATE_BOOLEAN)) { - return; // Allow, because `ABC` is a false-ish value. - } // Else, disallow client-side caching; because `ABC` is a true-ish value. - // ↑ Note that inclusion patterns are ignored in this case, in favor of `ABC`. - } - return $self->sendNoCacheHeaders(); // Disallow; default behavior in this mode. - } -}; diff --git a/src/includes/closures/Ac/NcDebugConsts.php b/src/includes/closures/Ac/NcDebugConsts.php deleted file mode 100644 index 5aeb011..0000000 --- a/src/includes/closures/Ac/NcDebugConsts.php +++ /dev/null @@ -1,293 +0,0 @@ -debug_info = array('reason_code' => '', 'reason' => ''); - -/* - * Used to setup debug info (if enabled). - * - * @since 150422 Rewrite. - * - * @param string $reason_code One of the `NC_DEBUG_` constants. - * @param string $reason Optionally override the built-in description with a custom message. - */ -$self->maybeSetDebugInfo = function ($reason_code, $reason = '') use ($self) { - if (!COMET_CACHE_DEBUGGING_ENABLE) { - return; // Nothing to do. - } - $reason = (string) $reason; - if (!($reason_code = (string) $reason_code)) { - return; // Not applicable. - } - $self->debug_info = array('reason_code' => $reason_code, 'reason' => $reason); -}; - -/* - * Echoes `NC_DEBUG_` info in the WordPress `shutdown` phase (if applicable). - * - * @since 150422 Rewrite. - * - * @attaches-to `shutdown` hook in WordPress w/ a late priority. - */ -$self->maybeEchoNcDebugInfo = function () use ($self) { - if (!COMET_CACHE_DEBUGGING_ENABLE) { - return; // Nothing to do. - } - if (is_admin()) { - return; // Not applicable. - } - if (strcasecmp(PHP_SAPI, 'cli') === 0) { - return; // Let's not run the risk here. - } - if ($self->debug_info && $self->hasACacheableContentType() && $self->is_a_wp_content_type) { - echo (string) $self->maybeGetNcDebugInfo($self->debug_info['reason_code'], $self->debug_info['reason']); - } -}; - -/* - * Gets `NC_DEBUG_` info (if applicable). - * - * @since 150422 Rewrite. - * - * @param string $reason_code One of the `NC_DEBUG_` constants. - * @param string $reason Optional; to override the default description with a custom message. - * - * @return string The debug info; i.e. full description (if applicable). - */ -$self->maybeGetNcDebugInfo = function ($reason_code = '', $reason = '') use ($self) { - if (!COMET_CACHE_DEBUGGING_ENABLE) { - return ''; // Not applicable. - } - $reason = (string) $reason; - if (!($reason_code = (string) $reason_code)) { - return ''; // Not applicable. - } - if (!$reason) { - switch ($reason_code) { - case NC_DEBUG_PHP_SAPI_CLI: - $reason = __('because `PHP_SAPI` reports that you are currently running from the command line.', 'comet-cache'); - break; // Break switch handler. - - case NC_DEBUG_NO_SERVER_HTTP_HOST: - $reason = __('because `$_SERVER[\'HTTP_HOST\']` is missing from your server configuration.', 'comet-cache'); - break; // Break switch handler. - - case NC_DEBUG_NO_SERVER_REQUEST_URI: - $reason = __('because `$_SERVER[\'REQUEST_URI\']` is missing from your server configuration.', 'comet-cache'); - break; // Break switch handler. - - case NC_DEBUG_COMET_CACHE_ALLOWED_CONSTANT: - if ($self->functionIsPossible('did_action') && did_action('ws_plugin__s2member_during_no_cache_constants')) { - $reason = __('because the s2Member plugin set the PHP constant `COMET_CACHE_ALLOWED` to a boolean-ish `FALSE` value at runtime. The s2Member plugin is serving content that must remain dynamic on this particular page, and therefore this page was intentionally not cached for a very good reason.', 'comet-cache'); - } else { - $reason = __('because the PHP constant `COMET_CACHE_ALLOWED` has been set to a boolean-ish `FALSE` value at runtime. Perhaps by WordPress itself, or by one of your themes/plugins. This usually means that you have a theme/plugin intentionally disabling the cache on this page; and it\'s usually for a very good reason.', 'comet-cache'); - } - break; // Break switch handler. - - case NC_DEBUG_COMET_CACHE_ALLOWED_SERVER_VAR: - $reason = __('because the environment variable `$_SERVER[\'COMET_CACHE_ALLOWED\']` has been set to a boolean-ish `FALSE` value at runtime. Perhaps by WordPress itself, or by one of your themes/plugins. This usually means that you have a theme/plugin intentionally disabling the cache on this page; and it\'s usually for a very good reason.', 'comet-cache'); - break; // Break switch handler. - - case NC_DEBUG_DONOTCACHEPAGE_CONSTANT: - $reason = __('because the PHP constant `DONOTCACHEPAGE` has been set at runtime. Perhaps by WordPress itself, or by one of your themes/plugins. This usually means that you have a theme/plugin intentionally disabling the cache on this page; and it\'s usually for a very good reason.', 'comet-cache'); - break; // Break switch handler. - - case NC_DEBUG_DONOTCACHEPAGE_SERVER_VAR: - $reason = __('because the environment variable `$_SERVER[\'DONOTCACHEPAGE\']` has been set at runtime. Perhaps by WordPress itself, or by one of your themes/plugins. This usually means that you have a theme/plugin intentionally disabling the cache on this page; and it\'s usually for a very good reason.', 'comet-cache'); - break; // Break switch handler. - - case NC_DEBUG_AC_GET_VAR: - $reason = sprintf(__('because `$_GET[\'%1$sAC\']` is set to a boolean-ish FALSE value.', 'comet-cache'), strtolower(SHORT_NAME)); - break; // Break switch handler. - - case NC_DEBUG_UNCACHEABLE_REQUEST: - $reason = __('because `$_SERVER[\'REQUEST_METHOD\']` is `POST`, `PUT`, `DELETE`, `HEAD`, `OPTIONS`, `TRACE` or `CONNECT`. These request methods should never (ever) be cached in any way.', 'comet-cache'); - break; // Break switch handler. - - case NC_DEBUG_SELF_SERVE_REQUEST: - $reason = __('because `[current IP address]` === `$_SERVER[\'SERVER_ADDR\']`; i.e. a self-serve request. DEVELOPER TIP: if you are testing on a localhost installation, please add `define(\'LOCALHOST\', TRUE);` to your `/wp-config.php` file while you run tests :-) Remove it (or set it to a `FALSE` value) once you go live on the web.', 'comet-cache'); - break; // Break switch handler. - - case NC_DEBUG_FEED_REQUEST: - $reason = __('because `$_SERVER[\'REQUEST_URI\']` indicates this is a `/feed`; and the configuration of this site says not to cache XML-based feeds.', 'comet-cache'); - break; // Break switch handler. - - case NC_DEBUG_WP_SYSTEMATICS: - $reason = __('because `$_SERVER[\'REQUEST_URI\']` indicates this is a `wp-` or `xmlrpc` file; i.e. a WordPress systematic file. WordPress systematics are never (ever) cached in any way.', 'comet-cache'); - break; // Break switch handler. - - case NC_DEBUG_WP_ADMIN: - $reason = __('because `$_SERVER[\'REQUEST_URI\']` or the `is_admin()` function indicates this is an administrative area of the site.', 'comet-cache'); - break; // Break switch handler. - - case NC_DEBUG_MS_FILES: - $reason = __('because `$_SERVER[\'REQUEST_URI\']` indicates this is a Multisite Network; and this was a request for `/files/*`, not a page.', 'comet-cache'); - break; // Break switch handler. - - case NC_DEBUG_IS_LOGGED_IN_USER: - case NC_DEBUG_IS_LIKE_LOGGED_IN_USER: - $reason = __('because the current user visiting this page (usually YOU), appears to be logged-in. The current configuration says NOT to cache pages for logged-in visitors. This message may also appear if you have an active PHP session on this site, or if you\'ve left (or replied to) a comment recently. If this message continues, please clear your cookies and try again.', 'comet-cache'); - break; // Break switch handler. - - case NC_DEBUG_IS_LOGGED_IN_USER_NONCE: - $reason = __('because the current page contains `_wpnonce` or `akismet_comment_nonce`. While your current configuration states that pages SHOULD be cache for logged-in visitors, `*nonce*` values in the markup are not cache-compatible. See http://wsharks.com/1O1Kudy for further details.', 'comet-cache'); - break; // Break switch handler. - - case NC_DEBUG_PAGE_CONTAINS_NONCE: - $reason = __('because the current page contains `_wpnonce` or `akismet_comment_nonce`. Note that `*nonce*` values in the markup are not cache-compatible. See http://wsharks.com/1O1Kudy for further details.', 'comet-cache'); - break; // Break switch handler. - - case NC_DEBUG_NO_USER_TOKEN: - $reason = sprintf(__('because the current user appeared to be logged into the site (in one way or another); but %1$s was unable to formulate a User Token for them. Please report this as a possible bug.', 'comet-cache'), NAME); - break; // Break switch handler. - - case NC_DEBUG_GET_REQUEST_QUERIES: - $reason = __('because `$_GET` contains query string data. The current configuration says NOT to cache GET requests with a query string.', 'comet-cache'); - break; // Break switch handler. - - case NC_DEBUG_PREVIEW: - $reason = __('because `$_REQUEST` indicates this is simply a preview of something to come.', 'comet-cache'); - break; // Break switch handler. - - case NC_DEBUG_EXCLUDED_URIS: - $reason = __('because `$_SERVER[\'REQUEST_URI\']` matches a configured URI Exclusion Pattern on this installation.', 'comet-cache'); - break; // Break switch handler. - - case NC_DEBUG_EXCLUDED_AGENTS: - $reason = __('because `$_SERVER[\'HTTP_USER_AGENT\']` matches a configured User-Agent Exclusion Pattern on this installation.', 'comet-cache'); - break; // Break switch handler. - - case NC_DEBUG_EXCLUDED_REFS: - $reason = __('because `$_SERVER[\'HTTP_REFERER\']` and/or `$_GET[\'_wp_http_referer\']` matches a configured HTTP Referrer Exclusion Pattern on this installation.', 'comet-cache'); - break; // Break switch handler. - - case NC_DEBUG_404_REQUEST: - $reason = __('because the WordPress `is_404()` Conditional Tag says the current page is a 404 error. The current configuration says NOT to cache 404 errors.', 'comet-cache'); - break; // Break switch handler. - - case NC_DEBUG_MAINTENANCE_PLUGIN: - $reason = __('because a plugin running on this installation says this page is in Maintenance Mode; i.e. is not available publicly at this time.', 'comet-cache'); - break; // Break switch handler. - - case NC_DEBUG_OB_ZLIB_CODING_TYPE: - $reason = sprintf(__('because %1$s is unable to cache already-compressed output. Please use `mod_deflate` w/ Apache; or use `zlib.output_compression` in your `php.ini` file. %1$s is NOT compatible with `ob_gzhandler()` and others like this.', 'comet-cache'), NAME); - break; // Break switch handler. - - case NC_DEBUG_WP_ERROR_PAGE: - $reason = __('because the contents of this document contain ``, which indicates this is an auto-generated WordPress error message.', 'comet-cache'); - break; // Break switch handler. - - case NC_DEBUG_UNCACHEABLE_CONTENT_TYPE: - $reason = __('because a `Content-Type:` header was set via PHP at runtime. The header contains a MIME type which is NOT a variation of HTML or XML. This header might have been set by your hosting company, by WordPress itself; or by one of your themes/plugins.', 'comet-cache'); - break; // Break switch handler. - - case NC_DEBUG_UNCACHEABLE_STATUS: - $reason = __('because a `Status:` header (or an `HTTP/` header) was set via PHP at runtime. The header contains a non-`2xx` status code. This indicates the current page was not loaded successfully. This header might have been set by your hosting company, by WordPress itself; or by one of your themes/plugins.', 'comet-cache'); - break; // Break switch handler. - - case NC_DEBUG_1ST_TIME_404_SYMLINK: - $reason = sprintf(__('because the WordPress `is_404()` Conditional Tag says the current page is a 404 error; and this is the first time it\'s happened on this page. Your current configuration says that 404 errors SHOULD be cached, so %1$s built a cached symlink which points future requests for this location to your already-cached 404 error document. If you reload this page (assuming you don\'t clear the cache before you do so); you should get a cached version of your 404 error document. This message occurs ONCE for each new/unique 404 error request.', 'comet-cache'), NAME); - break; // Break switch handler. - - case NC_DEBUG_EARLY_BUFFER_TERMINATION: - $reason = sprintf(__('because %1$s detected an early output buffer termination. This may happen when a theme/plugin ends, cleans, or flushes all output buffers before reaching the PHP shutdown phase. It\'s not always a bad thing. Sometimes it is necessary for a theme/plugin to do this. However, in this scenario it is NOT possible to cache the output; since %1$s is effectively disabled at runtime when this occurs.', 'comet-cache'), NAME); - break; // Break switch handler. - - default: // Default case handler. - $reason = __('due to an unexpected behavior in the application. Please report this as a bug!', 'comet-cache'); - break; // Break switch handler. - } - } - return "\n".''; -}; diff --git a/src/includes/closures/Ac/ObUtils.php b/src/includes/closures/Ac/ObUtils.php deleted file mode 100644 index eec62c0..0000000 --- a/src/includes/closures/Ac/ObUtils.php +++ /dev/null @@ -1,353 +0,0 @@ -protocol = ''; - -/* - * Host token for this request. - * - * @since 150821 Improving multisite compat. - * - * @type string Host token for this request. - */ -$self->host_token = ''; - -/* - * Host base/dir tokens for this request. - * - * @since 150821 Improving multisite compat. - * - * @type string Host base/dir tokens for this request. - */ -$self->host_base_dir_tokens = ''; - -/* - * Calculated version salt; set by site configuration data. - * - * @since 150422 Rewrite. - * - * @type string|mixed Any scalar value does fine. - */ -$self->version_salt = ''; - -/* - * Relative cache path for the current request. - * - * @since 150422 Rewrite. - * - * @type string Cache path for the current request. - */ -$self->cache_path = ''; - -/* - * Absolute cache file path for the current request. - * - * @since 150422 Rewrite. - * - * @type string Absolute cache file path for the current request. - */ -$self->cache_file = ''; - -/* - * Relative 404 cache path for the current request. - * - * @since 150422 Rewrite. - * - * @type string 404 cache path for the current request. - */ -$self->cache_path_404 = ''; - -/* - * Absolute 404 cache file path for the current request. - * - * @since 150422 Rewrite. - * - * @type string Absolute 404 cache file path for the current request. - */ -$self->cache_file_404 = ''; - -/* - * Version salt followed by the current request location. - * - * @since 150422 Rewrite. - * - * @type string Version salt followed by the current request location. - */ -$self->salt_location = ''; - -/* - * Calculated max age; i.e., before expiration. - * - * @since 151002 Load average checks in pro version. - * - * @type integer Calculated max age; i.e., before expiration. - */ -$self->cache_max_age = 0; - -/* - * Start output buffering (if applicable); or serve a cache file (if possible). - * - * @since 150422 Rewrite. - * - * @note This is a vital part of Comet Cache. This method serves existing (fresh) cache files. - * It is also responsible for beginning the process of collecting the output buffer. - */ -$self->maybeStartOutputBuffering = function () use ($self) { - if (strcasecmp(PHP_SAPI, 'cli') === 0) { - return $self->maybeSetDebugInfo(NC_DEBUG_PHP_SAPI_CLI); - } - if (empty($_SERVER['HTTP_HOST']) || !$self->hostToken()) { - return $self->maybeSetDebugInfo(NC_DEBUG_NO_SERVER_HTTP_HOST); - } - if (empty($_SERVER['REQUEST_URI'])) { - return $self->maybeSetDebugInfo(NC_DEBUG_NO_SERVER_REQUEST_URI); - } - if (defined('COMET_CACHE_ALLOWED') && !COMET_CACHE_ALLOWED) { - return $self->maybeSetDebugInfo(NC_DEBUG_COMET_CACHE_ALLOWED_CONSTANT); - } - if (isset($_SERVER['COMET_CACHE_ALLOWED']) && !$_SERVER['COMET_CACHE_ALLOWED']) { - return $self->maybeSetDebugInfo(NC_DEBUG_COMET_CACHE_ALLOWED_SERVER_VAR); - } - if (defined('DONOTCACHEPAGE')) { - return $self->maybeSetDebugInfo(NC_DEBUG_DONOTCACHEPAGE_CONSTANT); - } - if (isset($_SERVER['DONOTCACHEPAGE'])) { - return $self->maybeSetDebugInfo(NC_DEBUG_DONOTCACHEPAGE_SERVER_VAR); - } - if (isset($_GET[strtolower(SHORT_NAME).'AC']) && !filter_var($_GET[strtolower(SHORT_NAME).'AC'], FILTER_VALIDATE_BOOLEAN)) { - return $self->maybeSetDebugInfo(NC_DEBUG_AC_GET_VAR); - } - if ($self->isUncacheableRequestMethod()) { - return $self->maybeSetDebugInfo(NC_DEBUG_UNCACHEABLE_REQUEST); - } - if (isset($_SERVER['SERVER_ADDR']) && $self->currentIp() === $_SERVER['SERVER_ADDR']) { - if ((!IS_PRO || !$self->isAutoCacheEngine()) && !$self->isLocalhost()) { - return $self->maybeSetDebugInfo(NC_DEBUG_SELF_SERVE_REQUEST); - } - } - if (!COMET_CACHE_FEEDS_ENABLE && $self->isFeed()) { - return $self->maybeSetDebugInfo(NC_DEBUG_FEED_REQUEST); - } - if (preg_match('/\/(?:wp\-[^\/]+|xmlrpc)\.php(?:[?]|$)/i', $_SERVER['REQUEST_URI'])) { - return $self->maybeSetDebugInfo(NC_DEBUG_WP_SYSTEMATICS); - } - if (is_admin() || preg_match('/\/wp-admin(?:[\/?]|$)/i', $_SERVER['REQUEST_URI'])) { - return $self->maybeSetDebugInfo(NC_DEBUG_WP_ADMIN); - } - if (is_multisite() && preg_match('/\/files(?:[\/?]|$)/i', $_SERVER['REQUEST_URI'])) { - return $self->maybeSetDebugInfo(NC_DEBUG_MS_FILES); - } - if ((!IS_PRO || !COMET_CACHE_WHEN_LOGGED_IN) && $self->isLikeUserLoggedIn()) { - return $self->maybeSetDebugInfo(NC_DEBUG_IS_LIKE_LOGGED_IN_USER); - } - if (!COMET_CACHE_GET_REQUESTS && $self->requestContainsUncacheableQueryVars()) { - return $self->maybeSetDebugInfo(NC_DEBUG_GET_REQUEST_QUERIES); - } - if (!empty($_REQUEST['preview'])) { - return $self->maybeSetDebugInfo(NC_DEBUG_PREVIEW); - } - if (COMET_CACHE_EXCLUDE_URIS && preg_match(COMET_CACHE_EXCLUDE_URIS, $_SERVER['REQUEST_URI'])) { - return $self->maybeSetDebugInfo(NC_DEBUG_EXCLUDED_URIS); - } - if (COMET_CACHE_EXCLUDE_AGENTS && !empty($_SERVER['HTTP_USER_AGENT']) && (!IS_PRO || !$self->isAutoCacheEngine())) { - if (preg_match(COMET_CACHE_EXCLUDE_AGENTS, $_SERVER['HTTP_USER_AGENT'])) { - return $self->maybeSetDebugInfo(NC_DEBUG_EXCLUDED_AGENTS); - } - } - if (COMET_CACHE_EXCLUDE_REFS && !empty($_REQUEST['_wp_http_referer'])) { - if (preg_match(COMET_CACHE_EXCLUDE_REFS, stripslashes($_REQUEST['_wp_http_referer']))) { - return $self->maybeSetDebugInfo(NC_DEBUG_EXCLUDED_REFS); - } - } - if (COMET_CACHE_EXCLUDE_REFS && !empty($_SERVER['HTTP_REFERER'])) { - if (preg_match(COMET_CACHE_EXCLUDE_REFS, $_SERVER['HTTP_REFERER'])) { - return $self->maybeSetDebugInfo(NC_DEBUG_EXCLUDED_REFS); - } - } - $self->protocol = $self->isSsl() ? 'https://' : 'http://'; - $self->host_token = $self->hostToken(); - $self->host_base_dir_tokens = $self->hostBaseDirTokens(); - - $self->version_salt = ''; // Initialize the version salt. - - $self->version_salt = $self->applyFilters(get_class($self).'__version_salt', $self->version_salt); - $self->version_salt = $self->applyFilters(GLOBAL_NS.'_version_salt', $self->version_salt); - - $self->cache_path = $self->buildCachePath($self->protocol.$self->host_token.$_SERVER['REQUEST_URI'], '', $self->version_salt); - $self->cache_file = COMET_CACHE_DIR.'/'.$self->cache_path; // Not considering a user cache. That's done in the postload phase. - - $self->cache_path_404 = $self->buildCachePath($self->protocol.$self->host_token.rtrim($self->host_base_dir_tokens, '/').'/'.COMET_CACHE_404_CACHE_FILENAME); - $self->cache_file_404 = COMET_CACHE_DIR.'/'.$self->cache_path_404; // Not considering a user cache at all here--ever. - - $self->salt_location = ltrim($self->version_salt.' '.$self->protocol.$self->host_token.$_SERVER['REQUEST_URI']); - - $self->cache_max_age = strtotime('-'.COMET_CACHE_MAX_AGE); - - if (IS_PRO && COMET_CACHE_WHEN_LOGGED_IN === 'postload' && $self->isLikeUserLoggedIn()) { - $self->postload['when_logged_in'] = true; // Enable postload check. - } elseif (is_file($self->cache_file) && (!$self->cache_max_age || filemtime($self->cache_file) >= $self->cache_max_age)) { - list($headers, $cache) = explode('', file_get_contents($self->cache_file), 2); - - $headers_list = $self->headersList(); - foreach (unserialize($headers) as $_header) { - if (!in_array($_header, $headers_list, true) && stripos($_header, 'Last-Modified:') !== 0) { - header($_header); // Only cacheable/safe headers are stored in the cache. - } - } - unset($_header); // Just a little housekeeping. - - if (COMET_CACHE_DEBUGGING_ENABLE && $self->isHtmlXmlDoc($cache)) { - $total_time = number_format(microtime(true) - $self->timer, 5, '.', ''); - $cache .= "\n".''; - // translators: This string is actually NOT translatable because the `__()` function is not available at this point in the processing. - $cache .= "\n".''; - } - exit($cache); // Exit with cache contents. - } else { - ob_start(array($self, 'outputBufferCallbackHandler')); - } - return; // Return value not applicable. -}; - -/* - * Output buffer handler; i.e. the cache file generator. - * - * @note We CANNOT depend on any WP functionality here; it will cause problems. - * Anything we need from WP should be saved in the postload phase as a scalar value. - * - * @since 150422 Rewrite. - * - * @param string $buffer The buffer from {@link \ob_start()}. - * @param int $phase A set of bitmask flags. - * - * @throws \Exception If unable to handle output buffering for any reason. - * - * @return string|bool The output buffer, or `FALSE` to indicate no change. - * - * @attaches-to {@link \ob_start()} - */ -$self->outputBufferCallbackHandler = function ($buffer, $phase) use ($self) { - if (!($phase & PHP_OUTPUT_HANDLER_END)) { - throw new \Exception(sprintf(__('Unexpected OB phase: `%1$s`.', 'comet-cache'), $phase)); - } - AdvCacheBackCompat::zenCacheConstants(); - - $cache = trim((string) $buffer); - - if (!isset($cache[0])) { - return false; // Don't cache an empty buffer. - } - if (!isset($GLOBALS[GLOBAL_NS.'_shutdown_flag'])) { - return (boolean) $self->maybeSetDebugInfo(NC_DEBUG_EARLY_BUFFER_TERMINATION); - } - if (defined('COMET_CACHE_ALLOWED') && !COMET_CACHE_ALLOWED) { - return (boolean) $self->maybeSetDebugInfo(NC_DEBUG_COMET_CACHE_ALLOWED_CONSTANT); - } - if (isset($_SERVER['COMET_CACHE_ALLOWED']) && !$_SERVER['COMET_CACHE_ALLOWED']) { - return (boolean) $self->maybeSetDebugInfo(NC_DEBUG_COMET_CACHE_ALLOWED_SERVER_VAR); - } - if (defined('DONOTCACHEPAGE')) { - return (boolean) $self->maybeSetDebugInfo(NC_DEBUG_DONOTCACHEPAGE_CONSTANT); - } - if (isset($_SERVER['DONOTCACHEPAGE'])) { - return (boolean) $self->maybeSetDebugInfo(NC_DEBUG_DONOTCACHEPAGE_SERVER_VAR); - } - if ((!IS_PRO || !COMET_CACHE_WHEN_LOGGED_IN) && $self->is_user_logged_in) { - return (boolean) $self->maybeSetDebugInfo(NC_DEBUG_IS_LOGGED_IN_USER); - } - if ((!IS_PRO || !COMET_CACHE_WHEN_LOGGED_IN) && $self->isLikeUserLoggedIn()) { - return (boolean) $self->maybeSetDebugInfo(NC_DEBUG_IS_LIKE_LOGGED_IN_USER); - } - if (!COMET_CACHE_CACHE_NONCE_VALUES && preg_match('/\b(?:_wpnonce|akismet_comment_nonce)\b/', $cache)) { - if (IS_PRO && COMET_CACHE_WHEN_LOGGED_IN && $self->isLikeUserLoggedIn()) { - if (!COMET_CACHE_CACHE_NONCE_VALUES_WHEN_LOGGED_IN) { - return (boolean)$self->maybeSetDebugInfo(NC_DEBUG_IS_LOGGED_IN_USER_NONCE); - } - } else { // Use the default debug notice for nonce conflicts. - return (boolean) $self->maybeSetDebugInfo(NC_DEBUG_PAGE_CONTAINS_NONCE); - } // An nonce makes the page dynamic; i.e., NOT cache compatible. - } - if ($self->is_404 && !COMET_CACHE_CACHE_404_REQUESTS) { - return (boolean) $self->maybeSetDebugInfo(NC_DEBUG_404_REQUEST); - } - if (stripos($cache, '') !== false) { - return (boolean) $self->maybeSetDebugInfo(NC_DEBUG_WP_ERROR_PAGE); - } - if (!$self->functionIsPossible('http_response_code')) { - if (stripos($cache, ''.$_notice['notice'].$_dismiss.'
%3$s
; auto-clearing.', 'comet-cache'), esc_html(NAME), esc_html($self->i18nFiles($_author_counter)), esc_html($_author['display_name'])));
- $enqueued_notices++; // Increment enqueued notices counter.
- }
- }
- unset($_author, $_author_regex, $_author_counter); // Housekeeping.
-
- $counter += $self->autoClearXmlFeedsCache('blog');
- $counter += $self->autoClearXmlFeedsCache('post-authors', $post_id);
-
- return $counter;
-};
diff --git a/src/includes/closures/Plugin/WcpCommentUtils.php b/src/includes/closures/Plugin/WcpCommentUtils.php
deleted file mode 100644
index 03ee6f4..0000000
--- a/src/includes/closures/Plugin/WcpCommentUtils.php
+++ /dev/null
@@ -1,96 +0,0 @@
-autoClearCommentPostCache = function ($comment_id) use ($self) {
- $counter = 0; // Initialize.
-
- if (!($comment_id = (integer) $comment_id)) {
- return $counter; // Nothing to do.
- }
- if (!is_null($done = &$self->cacheKey('autoClearCommentPostCache', $comment_id))) {
- return $counter; // Already did this.
- }
- $done = true; // Flag as having been done.
-
- if (!$self->options['enable']) {
- return $counter; // Nothing to do.
- }
- if (!is_object($comment = get_comment($comment_id))) {
- return $counter; // Nothing we can do.
- }
- if (empty($comment->comment_post_ID)) {
- return $counter; // Nothing we can do.
- }
- if ($comment->comment_approved === 'spam' || $comment->comment_approved === '0') {
- // Don't allow next `autoClearPostCache()` call to clear post cache.
- $allow = &$self->cacheKey('autoClearPostCache_allow');
- $allow = false; // Flag as false; i.e., disallow.
- return $counter;
- }
- $counter += $self->autoClearXmlFeedsCache('blog-comments');
- $counter += $self->autoClearXmlFeedsCache('post-comments', $comment->comment_post_ID);
- $counter += $self->autoClearPostCache($comment->comment_post_ID);
-
- return $counter;
-};
-
-/*
- * Automatically clears cache files for a post associated with a particular comment.
- *
- * @since 150422 Rewrite.
- *
- * @attaches-to `transition_comment_status` hook.
- *
- * @param string $new_status New comment status.
- * @param string $old_status Old comment status.
- * @param \stdClass $comment Comment object.
- *
- * @throws \Exception If a clear failure occurs.
- *
- * @return int Total files cleared by this routine (if any).
- *
- * @note This is also called upon by other routines which listen for
- * events that are indirectly associated with a comment ID.
- */
-$self->autoClearCommentPostCacheTransition = function ($new_status, $old_status, $comment) use ($self) {
- $counter = 0; // Initialize.
-
- if (!is_object($comment)) {
- return $counter; // Nothing we can do.
- }
- if (empty($comment->comment_post_ID)) {
- return $counter; // Nothing we can do.
- }
- if (!is_null($done = &$self->cacheKey('autoClearCommentPostCacheTransition', array($new_status, $old_status, $comment->comment_post_ID)))) {
- return $counter; // Already did this.
- }
- $done = true; // Flag as having been done.
-
- if (!$self->options['enable']) {
- return $counter; // Nothing to do.
- }
- if (!($old_status === 'approved' || ($old_status === 'unapproved' && $new_status === 'approved'))) {
- // If excluded here, don't allow next `autoClearPostCache()` call to clear post cache.
- $allow = &$self->cacheKey('autoClearPostCache_allow');
- $allow = false; // Flag as false; i.e., disallow.
- return $counter;
- }
- $counter += $self->autoClearXmlFeedsCache('blog-comments');
- $counter += $self->autoClearXmlFeedsCache('post-comments', $comment->comment_post_ID);
- $counter += $self->autoClearPostCache($comment->comment_post_ID);
-
- return $counter;
-};
diff --git a/src/includes/closures/Plugin/WcpFeedUtils.php b/src/includes/closures/Plugin/WcpFeedUtils.php
deleted file mode 100644
index e1e39a9..0000000
--- a/src/includes/closures/Plugin/WcpFeedUtils.php
+++ /dev/null
@@ -1,116 +0,0 @@
-autoClearXmlFeedsCache = function ($type, $post_id = 0) use ($self) {
- $counter = 0; // Initialize.
-
- if (!($type = (string) $type)) {
- return $counter; // Nothing we can do.
- }
- $post_id = (integer) $post_id; // Force integer.
-
- if (!is_null($done = &$self->cacheKey('autoClearXmlFeedsCache', array($type, $post_id)))) {
- return $counter; // Already did this.
- }
- $done = true; // Flag as having been done.
-
- if (!$self->options['enable']) {
- return $counter; // Nothing to do.
- }
- if (!$self->options['feeds_enable']) {
- return $counter; // Nothing to do.
- }
- if (!$self->options['cache_clear_xml_feeds_enable']) {
- return $counter; // Nothing to do.
- }
- if (!is_dir($cache_dir = $self->cacheDir())) {
- return $counter; // Nothing to do.
- }
- $utils = new FeedUtils(); // Feed utilities.
- $variations = $variation_regex_frags = array(); // Initialize.
-
- switch ($type) { // Handle clearing based on the `$type`.
-
- case 'blog': // The blog feed; i.e. `/feed/` on most WP installs.
- $variations = array_merge($variations, $utils->feedLinkVariations());
- break; // Break switch handler.
-
- case 'blog-comments': // The blog comments feed; i.e. `/comments/feed/` on most WP installs.
- $variations = array_merge($variations, $utils->feedLinkVariations('comments_'));
- break; // Break switch handler.
-
- case 'post-comments': // Feeds related to comments that a post has.
- if (!$post_id) {
- break; // Break switch handler.
- }
- if (!($post = get_post($post_id))) {
- break; // Break switch handler.
- }
- $variations = array_merge($variations, $utils->postCommentsFeedLinkVariations($post));
- break; // Break switch handler.
-
- case 'post-authors': // Feeds related to authors that a post has.
- if (!$post_id) {
- break; // Break switch handler.
- }
- if (!($post = get_post($post_id))) {
- break; // Break switch handler.
- }
- $variations = array_merge($variations, $utils->postAuthorFeedLinkVariations($post));
- break; // Break switch handler.
-
- case 'post-terms': // Feeds related to terms that a post has.
- if (!$post_id) {
- break; // Break switch handler.
- }
- if (!($post = get_post($post_id))) {
- break; // Break switch handler.
- }
- $variations = array_merge($variations, $utils->postTermFeedLinkVariations($post, true));
- break; // Break switch handler.
-
- case 'custom-post-type': // Feeds related to a custom post type archive view.
- if (!$post_id) {
- break; // Break switch handler.
- }
- if (!($post = get_post($post_id))) {
- break; // Break switch handler.
- }
- $variations = array_merge($variations, $utils->postTypeArchiveFeedLinkVariations($post));
- break; // Break switch handler.
-
- // @TODO Possibly consider search-related feeds in the future.
- // See: %3$s
; auto-clearing.', 'comet-cache'), esc_html(NAME), esc_html($self->i18nFiles($counter)), esc_html($type)));
- }
- return $counter;
-};
diff --git a/src/includes/closures/Plugin/WcpHomeBlogUtils.php b/src/includes/closures/Plugin/WcpHomeBlogUtils.php
deleted file mode 100644
index 9cad0f2..0000000
--- a/src/includes/closures/Plugin/WcpHomeBlogUtils.php
+++ /dev/null
@@ -1,101 +0,0 @@
-autoClearHomePageCache = function () use ($self) {
- $counter = 0; // Initialize.
-
- if (!is_null($done = &$self->cacheKey('autoClearHomePageCache'))) {
- return $counter; // Already did this.
- }
- $done = true; // Flag as having been done.
-
- if (!$self->options['enable']) {
- return $counter; // Nothing to do.
- }
- if (!$self->options['cache_clear_home_page_enable']) {
- return $counter; // Nothing to do.
- }
- if (!is_dir($cache_dir = $self->cacheDir())) {
- return $counter; // Nothing to do.
- }
- $regex = $self->buildHostCachePathRegex(home_url('/'));
- $counter += $self->clearFilesFromHostCacheDir($regex);
-
- if ($counter && is_admin() && (!IS_PRO || $self->options['change_notifications_enable'])) {
- $self->enqueueNotice(''.
- sprintf(__('%1$s: detected changes. Found %2$s in the cache for the designated "Home Page"; auto-clearing.', 'comet-cache'), esc_html(NAME), esc_html($self->i18nFiles($counter))));
- }
- $counter += $self->autoClearXmlFeedsCache('blog');
-
- return $counter;
-};
-
-/*
- * Automatically clears cache files for the posts page.
- *
- * @since 150422 Rewrite.
- *
- * @throws \Exception If a clear failure occurs.
- *
- * @return int Total files cleared by this routine (if any).
- *
- * @note Unlike many of the other `auto_` methods, this one is NOT currently
- * attached to any hooks. However, it is called upon by {@link autoClearPostCache()}.
- */
-$self->autoClearPostsPageCache = function () use ($self) {
- $counter = 0; // Initialize.
-
- if (!is_null($done = &$self->cacheKey('autoClearPostsPageCache'))) {
- return $counter; // Already did this.
- }
- $done = true; // Flag as having been done.
-
- if (!$self->options['enable']) {
- return $counter; // Nothing to do.
- }
- if (!$self->options['cache_clear_posts_page_enable']) {
- return $counter; // Nothing to do.
- }
- if (!is_dir($cache_dir = $self->cacheDir())) {
- return $counter; // Nothing to do.
- }
- $show_on_front = get_option('show_on_front');
- $page_for_posts = get_option('page_for_posts');
-
- if (!in_array($show_on_front, array('posts', 'page'), true)) {
- return $counter; // Nothing we can do in this case.
- }
- if ($show_on_front === 'page' && !$page_for_posts) {
- return $counter; // Nothing we can do.
- }
- if ($show_on_front === 'posts') {
- $posts_page = home_url('/');
- } elseif ($show_on_front === 'page') {
- $posts_page = get_permalink($page_for_posts);
- }
- if (empty($posts_page)) {
- return $counter; // Nothing we can do.
- }
- $regex = $self->buildHostCachePathRegex($posts_page);
- $counter += $self->clearFilesFromHostCacheDir($regex);
-
- if ($counter && is_admin() && (!IS_PRO || $self->options['change_notifications_enable'])) {
- $self->enqueueNotice(''.
- sprintf(__('%1$s: detected changes. Found %2$s in the cache for the designated "Posts Page"; auto-clearing.', 'comet-cache'), esc_html(NAME), esc_html($self->i18nFiles($counter))));
- }
- $counter += $self->autoClearXmlFeedsCache('blog');
-
- return $counter;
-};
diff --git a/src/includes/closures/Plugin/WcpJetpackUtils.php b/src/includes/closures/Plugin/WcpJetpackUtils.php
deleted file mode 100644
index 0cd6bec..0000000
--- a/src/includes/closures/Plugin/WcpJetpackUtils.php
+++ /dev/null
@@ -1,24 +0,0 @@
-autoClearCacheOnJetpackCustomCss = function ($args) use ($self) {
- $counter = 0; // Initialize.
-
- if (!is_null($done = &$self->cacheKey('autoClearCacheOnJetpackCustomCss', $args))) {
- return $counter; // Already did this.
- }
- $done = true; // Flag as having been done.
-
- if (empty($args['is_preview']) && class_exists('\\Jetpack')) {
- $counter += $self->autoClearCache();
- }
-};
diff --git a/src/includes/closures/Plugin/WcpOpcacheUtils.php b/src/includes/closures/Plugin/WcpOpcacheUtils.php
deleted file mode 100644
index 1137aa4..0000000
--- a/src/includes/closures/Plugin/WcpOpcacheUtils.php
+++ /dev/null
@@ -1,69 +0,0 @@
-wipeOpcache = function ($manually = false, $maybe = true, $files = array()) use ($self) {
- $counter = 0; // Initialize counter.
-
- if ($maybe && !$self->options['cache_clear_opcache_enable']) {
- return $counter; // Not enabled at this time.
- }
- if (!$self->functionIsPossible('opcache_reset')) {
- return $counter; // Not possible.
- }
- if (!($status = $self->sysOpcacheStatus())) {
- return $counter; // Not possible.
- }
- if (empty($status->opcache_enabled)) {
- return $counter; // Not necessary.
- }
- if (empty($status->opcache_statistics->num_cached_keys)) {
- return $counter; // Not possible.
- }
- if ($files) { // Specific files?
- foreach ($files as $_file) {
- $counter += (int) opcache_invalidate($_file, true);
- } // unset($_file); // Housekeeping.
- } elseif (opcache_reset()) { // True if a reset occurs.
- $counter += $status->opcache_statistics->num_cached_keys;
- }
- return $counter;
-};
-
-/*
- * Clear (i.e., reset) OPCache.
- *
- * @since 151002 Adding OPCache support.
- *
- * @param bool $manually True if clearing is done manually.
- * @param boolean $maybe Defaults to a true value.
- *
- * @return integer Total keys cleared.
- */
-$self->clearOpcache = function ($manually = false, $maybe = true) use ($self) {
- if (!is_multisite() || is_main_site() || current_user_can($self->network_cap)) {
- return $self->wipeOpcache($manually, $maybe);
- }
- return 0; // Not applicable.
-};
-
-/*
- * Clear AC class file from Opcache (by force).
- *
- * @since 151215 Adding OPCache support.
- *
- * @return integer Total keys cleared.
- */
-$self->clearAcDropinFromOpcacheByForce = function () use ($self) {
- return $self->wipeOpcache(false, false, array(WP_CONTENT_DIR.'/advanced-cache.php'));
-};
diff --git a/src/includes/closures/Plugin/WcpPluginUtils.php b/src/includes/closures/Plugin/WcpPluginUtils.php
deleted file mode 100644
index 41f3d3b..0000000
--- a/src/includes/closures/Plugin/WcpPluginUtils.php
+++ /dev/null
@@ -1,22 +0,0 @@
-autoClearOnPluginActivationDeactivation = function ($plugin, $network_wide = false) use ($self) {
- if (!$self->applyWpFilters(GLOBAL_NS.'_auto_clear_on_plugin_activation_deactivation', true)) {
- return 0; // Nothing to do here.
- }
- return $self->{($network_wide ? 'autoWipeCache' : 'autoClearCache')}();
-};
diff --git a/src/includes/closures/Plugin/WcpPostTypeUtils.php b/src/includes/closures/Plugin/WcpPostTypeUtils.php
deleted file mode 100644
index 09be6c5..0000000
--- a/src/includes/closures/Plugin/WcpPostTypeUtils.php
+++ /dev/null
@@ -1,66 +0,0 @@
-autoClearCustomPostTypeArchiveCache = function ($post_id) use ($self) {
- $counter = 0; // Initialize.
-
- if (!($post_id = (integer) $post_id)) {
- return $counter; // Nothing to do.
- }
- if (!is_null($done = &$self->cacheKey('autoClearCustomPostTypeArchiveCache', $post_id))) {
- return $counter; // Already did this.
- }
- $done = true; // Flag as having been done.
-
- if (!$self->options['enable']) {
- return $counter; // Nothing to do.
- }
- if (!$self->options['cache_clear_custom_post_type_enable']) {
- return $counter; // Nothing to do.
- }
- if (!is_dir($cache_dir = $self->cacheDir())) {
- return $counter; // Nothing to do.
- }
- if (!($post_type = get_post_type($post_id))) {
- return $counter; // Nothing to do.
- }
- if (!($all_custom_post_types = get_post_types(array('_builtin' => false)))) {
- return $counter; // No custom post types.
- }
- if (!in_array($post_type, array_keys($all_custom_post_types), true)) {
- return $counter; // This is NOT a custom post type.
- }
- if (!($custom_post_type = get_post_type_object($post_type))) {
- return $counter; // Unable to retrieve post type.
- }
- if (empty($custom_post_type->labels->name) || !($custom_post_type_name = $custom_post_type->labels->name)) {
- $custom_post_type_name = __('Untitled', 'comet-cache');
- }
- if (!($custom_post_type_archive_link = get_post_type_archive_link($post_type))) {
- return $counter; // Nothing to do; no link to work from in this case.
- }
- $regex = $self->buildHostCachePathRegex($custom_post_type_archive_link);
- $counter += $self->clearFilesFromHostCacheDir($regex);
-
- if ($counter && is_admin() && (!IS_PRO || $self->options['change_notifications_enable'])) {
- $self->enqueueNotice(''.
- sprintf(__('%1$s: detected changes. Found %2$s in the cache for Custom Post Type: %3$s
; auto-clearing.', 'comet-cache'), esc_html(NAME), esc_html($self->i18nFiles($counter)), esc_html($custom_post_type_name)));
- }
- $counter += $self->autoClearXmlFeedsCache('custom-post-type', $post_id);
-
- return $counter;
-};
diff --git a/src/includes/closures/Plugin/WcpPostUtils.php b/src/includes/closures/Plugin/WcpPostUtils.php
deleted file mode 100644
index b7f0ab4..0000000
--- a/src/includes/closures/Plugin/WcpPostUtils.php
+++ /dev/null
@@ -1,176 +0,0 @@
-autoClearPostCache = function ($post_id, $force = false) use ($self) {
- $counter = 0; // Initialize.
-
- if (!is_null($allow = &$self->cacheKey('autoClearPostCache_allow'))) {
- if ($allow === false) { // Disallow?
- $allow = true; // Reset flag.
- return $counter;
- }
- }
- if (!($post_id = (integer) $post_id)) {
- return $counter; // Nothing to do.
- }
- if (!is_null($done = &$self->cacheKey('autoClearPostCache', array($post_id, $force)))) {
- return $counter; // Already did this.
- }
- $done = true; // Flag as having been done.
-
- if (!$self->options['enable']) {
- return $counter; // Nothing to do.
- }
- if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
- return $counter; // Nothing to do.
- }
- if (!is_dir($cache_dir = $self->cacheDir())) {
- return $counter; // Nothing to do.
- }
- if (!($post_type = get_post_type($post_id))) {
- return $counter; // Nothing to do.
- }
- $post_statuses = $self->postStatuses();
- $unpublished_post_statuses = array_diff($post_statuses, array('publish'));
- $is_bbpress_post_type = in_array($post_type, $self->bbPressPostTypes(), true);
-
- if (!empty($self->pre_post_update_post_permalink[$post_id])) {
- $permalink = $self->pre_post_update_post_permalink[$post_id];
- $self->pre_post_update_post_permalink[$post_id] = ''; // Reset; only used for post status transitions.
- } elseif (!($permalink = get_permalink($post_id))) {
- return $counter; // Nothing we can do.
- }
- if (!($post_status = get_post_status($post_id))) {
- return $counter; // Nothing to do.
- }
- if ($post_status === 'draft' && isset($GLOBALS['pagenow'], $_POST['publish'])
- && is_admin() && $GLOBALS['pagenow'] === 'post.php' && current_user_can('publish_posts')
- && strpos(wp_get_referer(), '/post-new.php') !== false
- ) {
- $post_status = 'publish'; // A new post being published now.
- }
- if (in_array($post_status, array('inherit', 'auto-draft'), true)) {
- return $counter; // Nothing to do. Note: `inherit` = revision.
- }
- if (in_array($post_status, array('draft', 'pending', 'future', 'trash'), true) && !$force) {
- return $counter; // Nothing to do; i.e., NOT forcing in this case.
- }
- if (($post_type_obj = get_post_type_object($post_type)) && !empty($post_type_obj->labels->singular_name)) {
- $post_type_singular_name = $post_type_obj->labels->singular_name; // Singular name for the post type.
- } else {
- $post_type_singular_name = __('Post', 'comet-cache'); // Default value.
- }
- $regex = $self->buildHostCachePathRegex($permalink);
- $counter += $self->clearFilesFromHostCacheDir($regex);
-
- if ($counter && is_admin() && (!IS_PRO || $self->options['change_notifications_enable'])) {
- $self->enqueueNotice(''.
- sprintf(__('%1$s: detected changes. Found %2$s in the cache for %3$s ID: %4$s
; auto-clearing.', 'comet-cache'), esc_html(NAME), esc_html($self->i18nFiles($counter)), esc_html($post_type_singular_name), esc_html($post_id)));
- }
- $counter += $self->autoClearXmlFeedsCache('blog');
- $counter += $self->autoClearXmlFeedsCache('post-terms', $post_id);
- $counter += $self->autoClearXmlFeedsCache('post-authors', $post_id);
-
- $counter += $self->autoClearXmlSitemapsCache();
- $counter += $self->autoClearHomePageCache();
- $counter += $self->autoClearPostsPageCache();
- $counter += $self->autoClearPostTermsCache($post_id, $force);
- $counter += $self->autoClearCustomPostTypeArchiveCache($post_id);
-
-
- if ($post_type !== 'page' && ($parent_post_id = wp_get_post_parent_id($post_id))) {
- // Recursion: i.e., nested post types like bbPress forums/topic/replies.
- $counter += $self->autoClearPostCache($parent_post_id, $force);
- }
- return $counter;
-};
-$self->auto_clear_post_cache = $self->autoClearPostCache; // Back compat.
-
-/*
- * Handles post status transitioning.
- *
- * @attaches-to `pre_post_update` hook.
- *
- * @since 150422 Rewrite.
- *
- * @param int $post_id Post ID.
- * @param array $data Array of unslashed post data.
- *
- * @throws \Exception If a clear failure occurs.
- *
- * @return int Total files cleared by this routine (if any).
- *
- * @note This is also called upon by other routines which listen for
- * events that are indirectly associated with a post ID.
- */
-$self->autoClearPostCacheTransition = function ($post_id, $data) use ($self) {
- $counter = 0; // Initialize.
-
- $old_status = (string) get_post_status($post_id);
- $new_status = (string) $data['post_status'];
- /*
- * When a post has a status of `pending` or `draft`, the `get_permalink()` function
- * does not return a friendly permalink and therefore `autoClearPostCache()` will
- * have no way of building a path to the cache file that should be cleared as part of
- * this post status transition. To get around this, we temporarily store the permalink
- * in $self->pre_post_update_post_permalink for `autoClearPostCache()` to use.
- *
- * See also: %4$s
; auto-clearing.', 'comet-cache'), esc_html(NAME), esc_html($self->i18nFiles($_term_counter)), esc_html($_term['taxonomy_label']), esc_html($_term['term_name'])));
- ++$enqueued_notices; // Increment enqueued notices counter.
- }
- }
- unset($_term, $_term_regex, $_term_counter); // Housekeeping.
-
- $counter += $self->autoClearXmlFeedsCache('post-terms', $post_id);
-
- return $counter;
-};
diff --git a/src/includes/closures/Plugin/WcpUpdaterUtils.php b/src/includes/closures/Plugin/WcpUpdaterUtils.php
deleted file mode 100644
index 215ad69..0000000
--- a/src/includes/closures/Plugin/WcpUpdaterUtils.php
+++ /dev/null
@@ -1,99 +0,0 @@
-autoClearOnUpgraderProcessComplete = function (\WP_Upgrader $upgrader_instance, array $data) use ($self) {
- $counter = 0; // Initialize.
-
- switch (!empty($data['type']) ? $data['type'] : '') {
- case 'plugin': // Plugin upgrade.
-
- $multi_plugin_update = $single_plugin_update = false;
- $upgrading_active_plugin = false; // Initialize.
-
- if (!empty($data['bulk']) && !empty($data['plugins']) && is_array($data['plugins'])) {
- $multi_plugin_update = true;
- } elseif (!empty($data['plugin']) && is_string($data['plugin'])) {
- $single_plugin_update = true;
- }
- if ($multi_plugin_update) {
- foreach ($data['plugins'] as $_plugin) {
- if ($_plugin && is_string($_plugin) && is_plugin_active($_plugin)) {
- $upgrading_active_plugin = true;
- break; // Got what we need here.
- }
- }
- unset($_plugin); // Housekeeping.
- } elseif ($single_plugin_update && is_plugin_active($data['plugin'])) {
- $upgrading_active_plugin = true;
- }
- if ($upgrading_active_plugin) {
- $counter += $self->autoClearCache();
- }
- break; // Break switch.
-
- case 'theme': // Theme upgrade.
-
- $current_active_theme = wp_get_theme();
- $current_active_theme_parent = $current_active_theme->parent();
- $multi_theme_update = $single_theme_update = false;
- $upgrading_active_parent_theme = $upgrading_active_theme = false;
-
- if (!empty($data['bulk']) && !empty($data['themes']) && is_array($data['themes'])) {
- $multi_theme_update = true;
- } elseif (!empty($data['theme']) && is_string($data['theme'])) {
- $single_theme_update = true;
- }
- if ($multi_theme_update) {
- foreach ($data['themes'] as $_theme) {
- if (!$_theme || !is_string($_theme) || !($_theme_obj = wp_get_theme($_theme))) {
- continue; // Unable to acquire theme object instance.
- }
- if ($current_active_theme_parent && $current_active_theme_parent->get_stylesheet() === $_theme_obj->get_stylesheet()) {
- $upgrading_active_parent_theme = true;
- break; // Got what we needed here.
- } elseif ($current_active_theme->get_stylesheet() === $_theme_obj->get_stylesheet()) {
- $upgrading_active_theme = true;
- break; // Got what we needed here.
- }
- }
- unset($_theme, $_theme_obj); // Housekeeping.
- } elseif ($single_theme_update && ($_theme_obj = wp_get_theme($data['theme']))) {
- if ($current_active_theme_parent && $current_active_theme_parent->get_stylesheet() === $_theme_obj->get_stylesheet()) {
- $upgrading_active_parent_theme = true;
- } elseif ($current_active_theme->get_stylesheet() === $_theme_obj->get_stylesheet()) {
- $upgrading_active_theme = true;
- }
- }
- unset($_theme_obj); // Housekeeping.
-
- if ($upgrading_active_theme || $upgrading_active_parent_theme) {
- $counter += $self->autoClearCache();
- }
- break; // Break switch.
-
- case 'core': // Core upgrade.
- default: // Or any other sort of upgrade.
-
- $counter += $self->autoClearCache();
-
- break; // Break switch.
- }
-};
diff --git a/src/includes/closures/Plugin/WcpUtils.php b/src/includes/closures/Plugin/WcpUtils.php
deleted file mode 100644
index ce34b96..0000000
--- a/src/includes/closures/Plugin/WcpUtils.php
+++ /dev/null
@@ -1,341 +0,0 @@
-pre_post_update_post_permalink = array();
-
-/*
- * Wipes out all cache files.
- *
- * @since 150422 Rewrite.
- *
- * @param bool $manually TRUE if wiping is done manually.
- *
- * @throws \Exception If a wipe failure occurs.
- *
- * @return int Total files wiped by this routine.
- */
-$self->wipeCache = function ($manually = false) use ($self) {
- $counter = 0; // Initialize.
-
- if (!$manually && $self->disableAutoWipeCacheRoutines()) {
- return $counter; // Nothing to do.
- }
- @set_time_limit(1800); // @TODO Display a warning.
-
- if (is_dir($cache_dir = $self->cacheDir())) {
- $regex = $self->assembleCachePathRegex('', '.+');
- $counter += $self->wipeFilesFromCacheDir($regex);
- }
-
-
-
-
-
- return $counter;
-};
-$self->wipe_cache = $self->wipeCache; // Back compat.
-
-/*
- * Clears cache files (current blog).
- *
- * @since 150422 Rewrite.
- *
- * @param bool $manually TRUE if clearing is done manually.
- *
- * @throws \Exception If a clearing failure occurs.
- *
- * @return int Total files cleared by this routine.
- */
-$self->clearCache = function ($manually = false) use ($self) {
- $counter = 0; // Initialize.
-
- if (!$manually && $self->disableAutoClearCacheRoutines()) {
- return $counter; // Nothing to do.
- }
- @set_time_limit(1800); // @TODO Display a warning.
-
- if (is_dir($cache_dir = $self->cacheDir())) {
- $regex = $self->buildHostCachePathRegex('', '.+');
- $counter += $self->clearFilesFromHostCacheDir($regex);
- }
-
-
-
-
-
- return $counter;
-};
-$self->clear_cache = $self->clearCache; // Back compat.
-
-/*
- * Purges expired cache files (current blog).
- *
- * @since 150422 Rewrite.
- *
- * @param bool $manually TRUE if purging is done manually.
- *
- * @throws \Exception If a purge failure occurs.
- *
- * @return int Total files purged by this routine.
- */
-$self->purgeCache = function ($manually = false) use ($self) {
- $counter = 0; // Initialize.
-
- if (!$manually && $self->disableAutoPurgeCacheRoutines()) {
- return $counter; // Nothing to do.
- }
- @set_time_limit(1800); // @TODO Display a warning.
-
- if (is_dir($cache_dir = $self->cacheDir())) {
- $regex = $self->buildHostCachePathRegex('', '.+');
- $counter += $self->purgeFilesFromHostCacheDir($regex);
- }
-
- return $counter;
-};
-$self->purge_cache = $self->purgeCache; // Back compat.
-
-/*
- * Wurges (purges) all expired cache files; like wipe, but expired files only.
- *
- * @since 151002 Look at entire cache directory.
- *
- * @param bool $manually TRUE if wurging is done manually.
- *
- * @throws \Exception If a wurge failure occurs.
- *
- * @return int Total files wurged by this routine.
- */
-$self->wurgeCache = function ($manually = false) use ($self) {
- $counter = 0; // Initialize.
-
- if (!$manually && $self->disableAutoPurgeCacheRoutines()) {
- return $counter; // Nothing to do.
- }
- @set_time_limit(1800); // @TODO Display a warning.
-
- if (is_dir($cache_dir = $self->cacheDir())) {
- $regex = $self->assembleCachePathRegex('', '.+');
- $counter += $self->wurgeFilesFromCacheDir($regex);
- }
-
- return $counter;
-};
-
-/*
- * Automatically wipes out all cache files.
- *
- * @attaches-to Nothing at this time.
- *
- * @since 150422 Rewrite.
- *
- * @return int Total files wiped by this routine (if any).
- *
- * @note Unlike many of the other `auto_` methods, this one is NOT currently attached to any hooks.
- * This is called upon whenever options are saved and/or restored though.
- */
-$self->autoWipeCache = function () use ($self) {
- $counter = 0; // Initialize.
-
- if (!is_null($done = &$self->cacheKey('autoWipeCache'))) {
- return $counter; // Already did this.
- }
- $done = true; // Flag as having been done.
-
- if (!$self->options['enable']) {
- return $counter; // Nothing to do.
- }
- if ($self->disableAutoWipeCacheRoutines()) {
- return $counter; // Nothing to do.
- }
- $counter += $self->wipeCache();
-
- if ($counter && is_admin() && (!IS_PRO || $self->options['change_notifications_enable'])) {
- $self->enqueueNotice(''.
- sprintf(__('%1$s: detected significant changes. Found %2$s in the cache; auto-wiping.', 'comet-cache'), esc_html(NAME), esc_html($self->i18nFiles($counter))));
- }
- return $counter;
-};
-
-/*
- * Automatically clears all cache files (current host).
- *
- * @attaches-to `switch_theme` hook.
- *
- * @attaches-to `wp_create_nav_menu` hook.
- * @attaches-to `wp_update_nav_menu` hook.
- * @attaches-to `wp_delete_nav_menu` hook.
- *
- * @attaches-to `create_term` hook.
- * @attaches-to `edit_terms` hook.
- * @attaches-to `delete_term` hook.
- *
- * @attaches-to `add_link` hook.
- * @attaches-to `edit_link` hook.
- * @attaches-to `delete_link` hook.
- *
- * @since 150422 Rewrite.
- *
- * @return int Total files cleared by this routine (if any).
- *
- * @note This is also called upon during plugin activation.
- */
-$self->autoClearCache = function () use ($self) {
- $counter = 0; // Initialize.
-
- if (!is_null($done = &$self->cacheKey('autoClearCache'))) {
- return $counter; // Already did this.
- }
- $done = true; // Flag as having been done.
-
- if (!$self->options['enable']) {
- return $counter; // Nothing to do.
- }
- if ($self->disableAutoClearCacheRoutines()) {
- return $counter; // Nothing to do.
- }
- $counter += $self->clearCache();
-
- if ($counter && is_admin() && (!IS_PRO || $self->options['change_notifications_enable'])) {
- $self->enqueueNotice(''.
- sprintf(__('%1$s: detected important site changes. Found %2$s in the cache for this site; auto-clearing.', 'comet-cache'), esc_html(NAME), esc_html($self->i18nFiles($counter))));
- }
- return $counter;
-};
-
-/*
- * Automatically purges all cache files (current host).
- *
- * @attaches-to Nothing at this time.
- *
- * @since 151002 While working on directory stats.
- *
- * @return int Total files purged by this routine.
- *
- * @note Unlike many of the other `auto_` methods, this one is NOT currently attached to any hooks.
- */
-$self->autoPurgeCache = function () use ($self) {
- $counter = 0; // Initialize.
-
- if (!is_null($done = &$self->cacheKey('autoPurgeCache'))) {
- return $counter; // Already did this.
- }
- $done = true; // Flag as having been done.
-
- if (!$self->options['enable']) {
- return $counter; // Nothing to do.
- }
- if ($self->disableAutoPurgeCacheRoutines()) {
- return $counter; // Nothing to do.
- }
- $counter += $self->purgeCache();
-
- if ($counter && is_admin() && (!IS_PRO || $self->options['change_notifications_enable'])) {
- $self->enqueueNotice(''.
- sprintf(__('%1$s: detected important site changes. Found %2$s in the cache for this site that were expired; auto-purging.', 'comet-cache'), esc_html(NAME), esc_html($self->i18nFiles($counter))));
- }
- return $counter;
-};
-
-/*
- * Automatically wurges all cache files.
- *
- * @attaches-to Nothing at this time.
- *
- * @since 151002 While working on directory stats.
- *
- * @return int Total files wurged by this routine.
- *
- * @note Unlike many of the other `auto_` methods, this one is NOT currently attached to any hooks.
- */
-$self->autoWurgeCache = function () use ($self) {
- $counter = 0; // Initialize.
-
- if (!is_null($done = &$self->cacheKey('autoWurgeCache'))) {
- return $counter; // Already did this.
- }
- $done = true; // Flag as having been done.
-
- if (!$self->options['enable']) {
- return $counter; // Nothing to do.
- }
- if ($self->disableAutoPurgeCacheRoutines()) {
- return $counter; // Nothing to do.
- }
- $counter += $self->wurgeCache();
-
- if ($counter && is_admin() && (!IS_PRO || $self->options['change_notifications_enable'])) {
- $self->enqueueNotice(''.
- sprintf(__('%1$s: detected important site changes. Found %2$s in the cache that were expired; auto-purging.', 'comet-cache'), esc_html(NAME), esc_html($self->i18nFiles($counter))));
- }
- return $counter;
-};
-
-/*
- * Allows a site owner to disable the automatic cache wiping routines.
- *
- * This is done by filtering `'.__GLOBAL_NS__.'_disable_auto_wipe_cache_routines` to return TRUE,
- * in which case this method returns TRUE, otherwise it returns FALSE.
- *
- * @since 150422 Rewrite.
- *
- * @return bool `TRUE` if disabled; and this also creates a dashboard notice in some cases.
- */
-$self->disableAutoWipeCacheRoutines = function () use ($self) {
- $is_disabled = (boolean) $self->applyWpFilters(GLOBAL_NS.'_disable_auto_wipe_cache_routines', false);
-
- if ($is_disabled && is_admin() && (!IS_PRO || $self->options['change_notifications_enable'])) {
- $self->enqueueMainNotice(''.
- sprintf(__('%1$s: detected significant changes that would normally trigger cache wiping routines. However, cache wiping routines have been disabled by a site administrator. [?]', 'comet-cache'), esc_html(NAME)));
- }
- return $is_disabled;
-};
-
-/*
- * Allows a site owner to disable the automatic cache clearing routines.
- *
- * This is done by filtering `'.__GLOBAL_NS__.'_disable_auto_clear_cache_routines` to return TRUE,
- * in which case this method returns TRUE, otherwise it returns FALSE.
- *
- * @since 150422 Rewrite.
- *
- * @return bool `TRUE` if disabled; and this also creates a dashboard notice in some cases.
- */
-$self->disableAutoClearCacheRoutines = function () use ($self) {
- $is_disabled = (boolean) $self->applyWpFilters(GLOBAL_NS.'_disable_auto_clear_cache_routines', false);
-
- if ($is_disabled && is_admin() && (!IS_PRO || $self->options['change_notifications_enable'])) {
- $self->enqueueMainNotice(''.
- sprintf(__('%1$s: detected important site changes that would normally trigger cache clearing routines. However, cache clearing routines have been disabled by a site administrator. [?]', 'comet-cache'), esc_html(NAME)));
- }
- return $is_disabled;
-};
-
-/*
- * Allows a site owner to disable the automatic cache purging routines.
- *
- * This is done by filtering `'.__GLOBAL_NS__.'_disable_auto_purge_cache_routines` to return TRUE,
- * in which case this method returns TRUE, otherwise it returns FALSE.
- *
- * @since 151002 While working on directory stats.
- *
- * @return bool `TRUE` if disabled; and this also creates a dashboard notice in some cases.
- */
-$self->disableAutoPurgeCacheRoutines = function () use ($self) {
- $is_disabled = (boolean) $self->applyWpFilters(GLOBAL_NS.'_disable_auto_purge_cache_routines', false);
-
- if ($is_disabled && is_admin() && (!IS_PRO || $self->options['change_notifications_enable'])) {
- $self->enqueueMainNotice(''.
- sprintf(__('%1$s: detected important site changes that would normally trigger cache purging routines. However, cache purging routines have been disabled by a site administrator. [?]', 'comet-cache'), esc_html(NAME)));
- }
- return $is_disabled;
-};
diff --git a/src/includes/closures/Plugin/WcpWooCommerceUtils.php b/src/includes/closures/Plugin/WcpWooCommerceUtils.php
deleted file mode 100644
index b02c2c5..0000000
--- a/src/includes/closures/Plugin/WcpWooCommerceUtils.php
+++ /dev/null
@@ -1,24 +0,0 @@
-autoClearPostCacheOnWooCommerceSetStock = function ($product) use ($self) {
- $counter = 0; // Initialize.
-
- if (!is_null($done = &$self->cacheKey('autoClearPostCacheOnWooCommerceSetStock'))) {
- return $counter; // Already did this.
- }
- $done = true; // Flag as having been done.
-
- if(class_exists('\\WooCommerce')) {
- $counter += $self->autoClearPostCache($product->id);
- }
-};
diff --git a/src/includes/closures/Shared/BlogUtils.php b/src/includes/closures/Shared/BlogUtils.php
deleted file mode 100644
index aefa257..0000000
--- a/src/includes/closures/Shared/BlogUtils.php
+++ /dev/null
@@ -1,31 +0,0 @@
-blogDetails = function ($blog_id = 0) use ($self) {
- if (!is_multisite() || $self->isAdvancedCache()) {
- return null; // Not possible.
- }
- if (($blog_id = (integer) $blog_id) < 0) {
- $blog_id = (integer) get_current_site()->blog_id;
- }
- if (!$blog_id) {
- $blog_id = (integer) get_current_blog_id();
- }
- if (!$blog_id || $blog_id < 0) {
- return null; // Not possible.
- }
- $details = get_blog_details($blog_id);
-
- return is_object($details) ? $details : null;
-};
diff --git a/src/includes/closures/Shared/CacheDirUtils.php b/src/includes/closures/Shared/CacheDirUtils.php
deleted file mode 100644
index 25a6089..0000000
--- a/src/includes/closures/Shared/CacheDirUtils.php
+++ /dev/null
@@ -1,643 +0,0 @@
-cacheDir = function ($rel_path = '') use ($self) {
- $rel_path = (string) $rel_path;
-
- if ($self->isAdvancedCache()) {
- $cache_dir = defined('COMET_CACHE_DIR') ? COMET_CACHE_DIR : '';
- } elseif (!empty($self->cache_sub_dir)) {
- $cache_dir = $self->wpContentBaseDirTo($self->cache_sub_dir);
- }
- if (empty($cache_dir)) {
- throw new \Exception(__('Unable to determine cache directory location.', 'comet-cache'));
- }
- return rtrim($cache_dir, '/').($rel_path ? '/'.ltrim($rel_path) : '');
-};
-
-/*
- * Wipe files from the cache directory (for all hosts/blogs);
- * i.e., those that match a specific regex pattern.
- *
- * @since 151002 While working on directory stats.
- *
- * @param string $regex A regex pattern; see {@link deleteFilesFromCacheDir()}.
- *
- * @return integer Total files wiped by this routine.
- */
-$self->wipeFilesFromCacheDir = function ($regex) use ($self) {
- return $self->deleteFilesFromCacheDir($regex);
-};
-
-/*
- * Clear files from the cache directory (for the current host);
- * i.e., those that match a specific regex pattern.
- *
- * @since 150422 Rewrite. Updated 151002 w/ multisite compat. improvements.
- *
- * @param string $regex A regex pattern; see {@link deleteFilesFromHostCacheDir()}.
- *
- * @return integer Total files cleared by this routine (if any).
- */
-$self->clearFilesFromHostCacheDir = function ($regex) use ($self) {
- return $self->deleteFilesFromHostCacheDir($regex);
-};
-
-/*
- * Wurge (purge) files from the cache directory (for all hosts/blogs);
- * i.e., those that match a specific regex pattern.
- *
- * @since 151002 While working on directory stats.
- *
- * @param string $regex A regex pattern; see {@link deleteFilesFromCacheDir()}.
- *
- * @return integer Total files wurged by this routine.
- */
-$self->wurgeFilesFromCacheDir = function ($regex) use ($self) {
- return $self->deleteFilesFromCacheDir($regex, true);
-};
-
-/*
- * Purge files from the cache directory (for the current host);
- * i.e., those that match a specific regex pattern.
- *
- * @since 150422 Rewrite. Updated 151002 w/ multisite compat. improvements.
- *
- * @param string $regex A regex pattern; see {@link deleteFilesFromHostCacheDir()}.
- *
- * @return integer Total files purged by this routine (if any).
- */
-$self->purgeFilesFromHostCacheDir = function ($regex) use ($self) {
- return $self->deleteFilesFromHostCacheDir($regex, true);
-};
-
-/*
- * Delete files from the cache directory (for all hosts/blogs);
- * i.e., those that match a specific regex pattern.
- *
- * @since 150422 Rewrite. Updated 151002 w/ multisite compat. improvements.
- *
- * @param string $regex A `/[regex pattern]/`; relative to the cache directory.
- * e.g. `/^http\/example\.com\/my\-slug(?:\/index)?(?:\.|\/(?:page\/[0-9]+|comment\-page\-[0-9]+)[.\/])/`
- *
- * Or, this can also be a full/absolute regex pattern against an absolute path;
- * provided that it always starts with `/^`; including the full absolute cache/host directory path.
- * e.g. `/^\/cache\/dir\/http\/example\.com\/my\-slug(?:\/index)?(?:\.|\/(?:page\/[0-9]+|comment\-page\-[0-9]+)[.\/])/`
- *
- * @param boolean $check_max_age Check max age? i.e., use purge behavior?
- *
- * @return integer Total files deleted by this routine (if any).
- *
- * @throws \Exception If unable to delete a file for any reason.
- *
- * @TODO Optimize this for multisite networks w/ a LOT of child blogs.
- * @TODO Optimize this for extremely large sites. A LOT of files here could slow things down.
- * This class member is currently used in wiping and purging for a network. So there is the potential for a LOT of files in a single scan.
- * See also: '.$_notice['notice'].'
'.$_dismiss.''.$_item.'
'."\n"; + } + + $_show_details = __('Show details.', 'comet-cache'); + $_hide_details = __('Hide details.', 'comet-cache'); + + $_combined = ''; + $_combined .= sprintf(__('%1$s detected changes and intelligently cleared the cache to keep your site up-to-date. '.$_show_details.'', 'comet-cache'), esc_html(NAME)).'
'; + $_combined .= '%2$s
; auto-clearing.', 'comet-cache'), esc_html($this->i18nFiles($_author_counter)), esc_html($_author['display_name'])), ['combinable' => true]);
+ ++$enqueued_notices; // Increment enqueued notices counter.
+ }
+ }
+ unset($_author, $_author_regex, $_author_counter); // Housekeeping.
+
+ $counter += $this->autoClearXmlFeedsCache('blog');
+ $counter += $this->autoClearXmlFeedsCache('post-authors', $post_id);
+
+ return $counter;
+ }
+}
diff --git a/src/includes/traits/Plugin/WcpCommentUtils.php b/src/includes/traits/Plugin/WcpCommentUtils.php
new file mode 100644
index 0000000..388c4c2
--- /dev/null
+++ b/src/includes/traits/Plugin/WcpCommentUtils.php
@@ -0,0 +1,103 @@
+cacheKey('autoClearCommentPostCache', $comment_id))) {
+ return $counter; // Already did this.
+ }
+ $done = true; // Flag as having been done.
+
+ if (!$this->options['enable']) {
+ return $counter; // Nothing to do.
+ }
+ if (!is_object($comment = get_comment($comment_id))) {
+ return $counter; // Nothing we can do.
+ }
+ if (empty($comment->comment_post_ID)) {
+ return $counter; // Nothing we can do.
+ }
+ if ($comment->comment_approved === 'spam' || $comment->comment_approved === '0') {
+ // Don't allow next `autoClearPostCache()` call to clear post cache.
+ $allow = &$this->cacheKey('autoClearPostCache_allow');
+ $allow = false; // Flag as false; i.e., disallow.
+ return $counter;
+ }
+ $counter += $this->autoClearXmlFeedsCache('blog-comments');
+ $counter += $this->autoClearXmlFeedsCache('post-comments', $comment->comment_post_ID);
+ $counter += $this->autoClearPostCache($comment->comment_post_ID);
+
+ return $counter;
+ }
+
+ /**
+ * Automatically clears cache files for a post associated with a particular comment.
+ *
+ * @since 150422 Rewrite.
+ *
+ * @attaches-to `transition_comment_status` hook.
+ *
+ * @param string $new_status New comment status.
+ * @param string $old_status Old comment status.
+ * @param \stdClass $comment Comment object.
+ *
+ * @throws \Exception If a clear failure occurs.
+ *
+ * @return int Total files cleared by this routine (if any).
+ *
+ * @note This is also called upon by other routines which listen for
+ * events that are indirectly associated with a comment ID.
+ */
+ public function autoClearCommentPostCacheTransition($new_status, $old_status, $comment)
+ {
+ $counter = 0; // Initialize.
+
+ if (!is_object($comment)) {
+ return $counter; // Nothing we can do.
+ }
+ if (empty($comment->comment_post_ID)) {
+ return $counter; // Nothing we can do.
+ }
+ if (!is_null($done = &$this->cacheKey('autoClearCommentPostCacheTransition', [$new_status, $old_status, $comment->comment_post_ID]))) {
+ return $counter; // Already did this.
+ }
+ $done = true; // Flag as having been done.
+
+ if (!$this->options['enable']) {
+ return $counter; // Nothing to do.
+ }
+ if (!($old_status === 'approved' || ($old_status === 'unapproved' && $new_status === 'approved'))) {
+ // If excluded here, don't allow next `autoClearPostCache()` call to clear post cache.
+ $allow = &$this->cacheKey('autoClearPostCache_allow');
+ $allow = false; // Flag as false; i.e., disallow.
+ return $counter;
+ }
+ $counter += $this->autoClearXmlFeedsCache('blog-comments');
+ $counter += $this->autoClearXmlFeedsCache('post-comments', $comment->comment_post_ID);
+ $counter += $this->autoClearPostCache($comment->comment_post_ID);
+
+ return $counter;
+ }
+}
diff --git a/src/includes/traits/Plugin/WcpFeedUtils.php b/src/includes/traits/Plugin/WcpFeedUtils.php
new file mode 100644
index 0000000..c381222
--- /dev/null
+++ b/src/includes/traits/Plugin/WcpFeedUtils.php
@@ -0,0 +1,121 @@
+cacheKey('autoClearXmlFeedsCache', [$type, $post_id]))) {
+ return $counter; // Already did this.
+ }
+ $done = true; // Flag as having been done.
+
+ if (!$this->options['enable']) {
+ return $counter; // Nothing to do.
+ }
+ if (!$this->options['feeds_enable']) {
+ return $counter; // Nothing to do.
+ }
+ if (!$this->options['cache_clear_xml_feeds_enable']) {
+ return $counter; // Nothing to do.
+ }
+ if (!is_dir($cache_dir = $this->cacheDir())) {
+ return $counter; // Nothing to do.
+ }
+ $utils = new Classes\FeedUtils(); // Feed utilities.
+ $variations = $variation_regex_frags = []; // Initialize.
+
+ switch ($type) { // Handle clearing based on the `$type`.
+
+ case 'blog': // The blog feed; i.e. `/feed/` on most WP installs.
+ $variations = array_merge($variations, $utils->feedLinkVariations());
+ break; // Break switch handler.
+
+ case 'blog-comments': // The blog comments feed; i.e. `/comments/feed/` on most WP installs.
+ $variations = array_merge($variations, $utils->feedLinkVariations('comments_'));
+ break; // Break switch handler.
+
+ case 'post-comments': // Feeds related to comments that a post has.
+ if (!$post_id) {
+ break; // Break switch handler.
+ }
+ if (!($post = get_post($post_id))) {
+ break; // Break switch handler.
+ }
+ $variations = array_merge($variations, $utils->postCommentsFeedLinkVariations($post));
+ break; // Break switch handler.
+
+ case 'post-authors': // Feeds related to authors that a post has.
+ if (!$post_id) {
+ break; // Break switch handler.
+ }
+ if (!($post = get_post($post_id))) {
+ break; // Break switch handler.
+ }
+ $variations = array_merge($variations, $utils->postAuthorFeedLinkVariations($post));
+ break; // Break switch handler.
+
+ case 'post-terms': // Feeds related to terms that a post has.
+ if (!$post_id) {
+ break; // Break switch handler.
+ }
+ if (!($post = get_post($post_id))) {
+ break; // Break switch handler.
+ }
+ $variations = array_merge($variations, $utils->postTermFeedLinkVariations($post, true));
+ break; // Break switch handler.
+
+ case 'custom-post-type': // Feeds related to a custom post type archive view.
+ if (!$post_id) {
+ break; // Break switch handler.
+ }
+ if (!($post = get_post($post_id))) {
+ break; // Break switch handler.
+ }
+ $variations = array_merge($variations, $utils->postTypeArchiveFeedLinkVariations($post));
+ break; // Break switch handler.
+
+ // @TODO Possibly consider search-related feeds in the future.
+ // See: %2$s
; auto-clearing.', 'comet-cache'), esc_html($this->i18nFiles($counter)), esc_html($type)), ['combinable' => true]);
+ }
+ return $counter;
+ }
+}
diff --git a/src/includes/traits/Plugin/WcpHomeBlogUtils.php b/src/includes/traits/Plugin/WcpHomeBlogUtils.php
new file mode 100644
index 0000000..08bfe55
--- /dev/null
+++ b/src/includes/traits/Plugin/WcpHomeBlogUtils.php
@@ -0,0 +1,106 @@
+cacheKey('autoClearHomePageCache'))) {
+ return $counter; // Already did this.
+ }
+ $done = true; // Flag as having been done.
+
+ if (!$this->options['enable']) {
+ return $counter; // Nothing to do.
+ }
+ if (!$this->options['cache_clear_home_page_enable']) {
+ return $counter; // Nothing to do.
+ }
+ if (!is_dir($cache_dir = $this->cacheDir())) {
+ return $counter; // Nothing to do.
+ }
+ $regex = $this->buildHostCachePathRegex(home_url('/'));
+ $counter += $this->clearFilesFromHostCacheDir($regex);
+
+ if ($counter && is_admin() && (!IS_PRO || $this->options['change_notifications_enable'])) {
+ $this->enqueueNotice(sprintf(__('Found %1$s in the cache for the designated "Home Page"; auto-clearing.', 'comet-cache'), esc_html($this->i18nFiles($counter))), ['combinable' => true]);
+ }
+ $counter += $this->autoClearXmlFeedsCache('blog');
+
+ return $counter;
+ }
+
+ /**
+ * Automatically clears cache files for the posts page.
+ *
+ * @since 150422 Rewrite.
+ *
+ * @throws \Exception If a clear failure occurs.
+ *
+ * @return int Total files cleared by this routine (if any).
+ *
+ * @note Unlike many of the other `auto_` methods, this one is NOT currently
+ * attached to any hooks. However, it is called upon by {@link autoClearPostCache()}.
+ */
+ public function autoClearPostsPageCache()
+ {
+ $counter = 0; // Initialize.
+
+ if (!is_null($done = &$this->cacheKey('autoClearPostsPageCache'))) {
+ return $counter; // Already did this.
+ }
+ $done = true; // Flag as having been done.
+
+ if (!$this->options['enable']) {
+ return $counter; // Nothing to do.
+ }
+ if (!$this->options['cache_clear_posts_page_enable']) {
+ return $counter; // Nothing to do.
+ }
+ if (!is_dir($cache_dir = $this->cacheDir())) {
+ return $counter; // Nothing to do.
+ }
+ $show_on_front = get_option('show_on_front');
+ $page_for_posts = get_option('page_for_posts');
+
+ if (!in_array($show_on_front, ['posts', 'page'], true)) {
+ return $counter; // Nothing we can do in this case.
+ }
+ if ($show_on_front === 'page' && !$page_for_posts) {
+ return $counter; // Nothing we can do.
+ }
+ if ($show_on_front === 'posts') {
+ $posts_page = home_url('/');
+ } elseif ($show_on_front === 'page') {
+ $posts_page = get_permalink($page_for_posts);
+ }
+ if (empty($posts_page)) {
+ return $counter; // Nothing we can do.
+ }
+ $regex = $this->buildHostCachePathRegex($posts_page);
+ $counter += $this->clearFilesFromHostCacheDir($regex);
+
+ if ($counter && is_admin() && (!IS_PRO || $this->options['change_notifications_enable'])) {
+ $this->enqueueNotice(sprintf(__('Found %1$s in the cache for the designated "Posts Page"; auto-clearing.', 'comet-cache'), esc_html($this->i18nFiles($counter))), ['combinable' => true]);
+ }
+ $counter += $this->autoClearXmlFeedsCache('blog');
+
+ return $counter;
+ }
+}
diff --git a/src/includes/traits/Plugin/WcpJetpackUtils.php b/src/includes/traits/Plugin/WcpJetpackUtils.php
new file mode 100644
index 0000000..17433cb
--- /dev/null
+++ b/src/includes/traits/Plugin/WcpJetpackUtils.php
@@ -0,0 +1,30 @@
+cacheKey('autoClearCacheOnJetpackCustomCss', $args))) {
+ return $counter; // Already did this.
+ }
+ $done = true; // Flag as having been done.
+
+ if (empty($args['is_preview']) && class_exists('\\Jetpack')) {
+ $counter += $this->autoClearCache();
+ }
+ }
+}
diff --git a/src/includes/traits/Plugin/WcpOpcacheUtils.php b/src/includes/traits/Plugin/WcpOpcacheUtils.php
new file mode 100644
index 0000000..8a2cb80
--- /dev/null
+++ b/src/includes/traits/Plugin/WcpOpcacheUtils.php
@@ -0,0 +1,77 @@
+options['cache_clear_opcache_enable']) {
+ return $counter; // Not enabled at this time.
+ }
+ if (!$this->functionIsPossible('opcache_reset')) {
+ return $counter; // Not possible.
+ }
+ if (!($status = $this->sysOpcacheStatus())) {
+ return $counter; // Not possible.
+ }
+ if (empty($status->opcache_enabled)) {
+ return $counter; // Not necessary.
+ }
+ if (empty($status->opcache_statistics->num_cached_keys)) {
+ return $counter; // Not possible.
+ }
+ if ($files) { // Specific files?
+ foreach ($files as $_file) {
+ $counter += (int) opcache_invalidate($_file, true);
+ } // unset($_file); // Housekeeping.
+ } elseif (opcache_reset()) { // True if a reset occurs.
+ $counter += $status->opcache_statistics->num_cached_keys;
+ }
+ return $counter;
+ }
+
+ /**
+ * Clear (i.e., reset) OPCache.
+ *
+ * @since 151002 Adding OPCache support.
+ *
+ * @param bool $manually True if clearing is done manually.
+ * @param bool $maybe Defaults to a true value.
+ *
+ * @return int Total keys cleared.
+ */
+ public function clearOpcache($manually = false, $maybe = true)
+ {
+ if (!is_multisite() || is_main_site() || current_user_can($this->network_cap)) {
+ return $this->wipeOpcache($manually, $maybe);
+ }
+ return 0; // Not applicable.
+ }
+
+ /**
+ * Clear AC class file from Opcache (by force).
+ *
+ * @since 151215 Adding OPCache support.
+ *
+ * @return int Total keys cleared.
+ */
+ public function clearAcDropinFromOpcacheByForce()
+ {
+ return $this->wipeOpcache(false, false, [WP_CONTENT_DIR.'/advanced-cache.php']);
+ }
+}
diff --git a/src/includes/traits/Plugin/WcpPluginUtils.php b/src/includes/traits/Plugin/WcpPluginUtils.php
new file mode 100644
index 0000000..4617f91
--- /dev/null
+++ b/src/includes/traits/Plugin/WcpPluginUtils.php
@@ -0,0 +1,28 @@
+applyWpFilters(GLOBAL_NS.'_auto_clear_on_plugin_activation_deactivation', true)) {
+ return 0; // Nothing to do here.
+ }
+ return $this->{($network_wide ? 'autoWipeCache' : 'autoClearCache')}();
+ }
+}
diff --git a/src/includes/traits/Plugin/WcpPostTypeUtils.php b/src/includes/traits/Plugin/WcpPostTypeUtils.php
new file mode 100644
index 0000000..0f47e72
--- /dev/null
+++ b/src/includes/traits/Plugin/WcpPostTypeUtils.php
@@ -0,0 +1,71 @@
+cacheKey('autoClearCustomPostTypeArchiveCache', $post_id))) {
+ return $counter; // Already did this.
+ }
+ $done = true; // Flag as having been done.
+
+ if (!$this->options['enable']) {
+ return $counter; // Nothing to do.
+ }
+ if (!$this->options['cache_clear_custom_post_type_enable']) {
+ return $counter; // Nothing to do.
+ }
+ if (!is_dir($cache_dir = $this->cacheDir())) {
+ return $counter; // Nothing to do.
+ }
+ if (!($post_type = get_post_type($post_id))) {
+ return $counter; // Nothing to do.
+ }
+ if (!($all_custom_post_types = get_post_types(['_builtin' => false]))) {
+ return $counter; // No custom post types.
+ }
+ if (!in_array($post_type, array_keys($all_custom_post_types), true)) {
+ return $counter; // This is NOT a custom post type.
+ }
+ if (!($custom_post_type = get_post_type_object($post_type))) {
+ return $counter; // Unable to retrieve post type.
+ }
+ if (empty($custom_post_type->labels->name) || !($custom_post_type_name = $custom_post_type->labels->name)) {
+ $custom_post_type_name = __('Untitled', 'comet-cache');
+ }
+ if (!($custom_post_type_archive_link = get_post_type_archive_link($post_type))) {
+ return $counter; // Nothing to do; no link to work from in this case.
+ }
+ $regex = $this->buildHostCachePathRegex($custom_post_type_archive_link);
+ $counter += $this->clearFilesFromHostCacheDir($regex);
+
+ if ($counter && is_admin() && (!IS_PRO || $this->options['change_notifications_enable'])) {
+ $this->enqueueNotice(sprintf(__('Found %1$s in the cache for Custom Post Type: %2$s
; auto-clearing.', 'comet-cache'), esc_html($this->i18nFiles($counter)), esc_html($custom_post_type_name)), ['combinable' => true]);
+ }
+ $counter += $this->autoClearXmlFeedsCache('custom-post-type', $post_id);
+
+ return $counter;
+ }
+}
diff --git a/src/includes/traits/Plugin/WcpPostUtils.php b/src/includes/traits/Plugin/WcpPostUtils.php
new file mode 100644
index 0000000..f343b87
--- /dev/null
+++ b/src/includes/traits/Plugin/WcpPostUtils.php
@@ -0,0 +1,190 @@
+cacheKey('autoClearPostCache_allow'))) {
+ if ($allow === false) { // Disallow?
+ $allow = true; // Reset flag.
+ return $counter;
+ }
+ }
+ if (!($post_id = (integer) $post_id)) {
+ return $counter; // Nothing to do.
+ }
+ if (!is_null($done = &$this->cacheKey('autoClearPostCache', [$post_id, $force]))) {
+ return $counter; // Already did this.
+ }
+ $done = true; // Flag as having been done.
+
+ if (!$this->options['enable']) {
+ return $counter; // Nothing to do.
+ }
+ if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
+ return $counter; // Nothing to do.
+ }
+ if (!is_dir($cache_dir = $this->cacheDir())) {
+ return $counter; // Nothing to do.
+ }
+ if (!($post_type = get_post_type($post_id))) {
+ return $counter; // Nothing to do.
+ }
+ $post_statuses = $this->postStatuses();
+ $unpublished_post_statuses = array_diff($post_statuses, ['publish']);
+ $is_bbpress_post_type = in_array($post_type, $this->bbPressPostTypes(), true);
+
+ if (!empty($this->pre_post_update_post_permalink[$post_id])) {
+ $permalink = $this->pre_post_update_post_permalink[$post_id];
+ $this->pre_post_update_post_permalink[$post_id] = ''; // Reset; only used for post status transitions.
+ } elseif (!($permalink = get_permalink($post_id))) {
+ return $counter; // Nothing we can do.
+ }
+ if (!($post_status = get_post_status($post_id))) {
+ return $counter; // Nothing to do.
+ }
+ if ($post_status === 'draft' && isset($GLOBALS['pagenow'], $_POST['publish'])
+ && is_admin() && $GLOBALS['pagenow'] === 'post.php' && current_user_can('publish_posts')
+ && strpos(wp_get_referer(), '/post-new.php') !== false
+ ) {
+ $post_status = 'publish'; // A new post being published now.
+ }
+ if (in_array($post_status, ['inherit', 'auto-draft'], true)) {
+ return $counter; // Nothing to do. Note: `inherit` = revision.
+ }
+ if (in_array($post_status, ['draft', 'pending', 'future', 'trash'], true) && !$force) {
+ return $counter; // Nothing to do; i.e., NOT forcing in this case.
+ }
+ if (($post_type_obj = get_post_type_object($post_type)) && !empty($post_type_obj->labels->singular_name)) {
+ $post_type_singular_name = $post_type_obj->labels->singular_name; // Singular name for the post type.
+ } else {
+ $post_type_singular_name = __('Post', 'comet-cache'); // Default value.
+ }
+ $regex = $this->buildHostCachePathRegex($permalink);
+ $counter += $this->clearFilesFromHostCacheDir($regex);
+
+ if ($counter && is_admin() && (!IS_PRO || $this->options['change_notifications_enable'])) {
+ $this->enqueueNotice(sprintf(__('Found %1$s in the cache for %2$s ID: %3$s
; auto-clearing.', 'comet-cache'), esc_html($this->i18nFiles($counter)), esc_html($post_type_singular_name), esc_html($post_id)), ['combinable' => true]);
+ }
+ $counter += $this->autoClearXmlFeedsCache('blog');
+ $counter += $this->autoClearXmlFeedsCache('post-terms', $post_id);
+ $counter += $this->autoClearXmlFeedsCache('post-authors', $post_id);
+
+ $counter += $this->autoClearXmlSitemapsCache();
+ $counter += $this->autoClearHomePageCache();
+ $counter += $this->autoClearPostsPageCache();
+ $counter += $this->autoClearPostTermsCache($post_id, $force);
+ $counter += $this->autoClearCustomPostTypeArchiveCache($post_id);
+
+
+ if ($post_type !== 'page' && ($parent_post_id = wp_get_post_parent_id($post_id))) {
+ // Recursion: i.e., nested post types like bbPress forums/topic/replies.
+ $counter += $this->autoClearPostCache($parent_post_id, $force);
+ }
+ return $counter;
+ }
+
+ // @codingStandardsIgnoreStart
+ /*
+ * Back compat. alias for autoClearPostCache()
+ */
+ public function auto_clear_post_cache()
+ { // @codingStandardsIgnoreEnd
+ return call_user_func_array([$this, 'autoClearPostCache'], func_get_args());
+ }
+
+ /**
+ * Handles post status transitioning.
+ *
+ * @attaches-to `pre_post_update` hook.
+ *
+ * @since 150422 Rewrite.
+ *
+ * @param int $post_id Post ID.
+ * @param array $data Array of unslashed post data.
+ *
+ * @throws \Exception If a clear failure occurs.
+ *
+ * @return int Total files cleared by this routine (if any).
+ *
+ * @note This is also called upon by other routines which listen for
+ * events that are indirectly associated with a post ID.
+ */
+ public function autoClearPostCacheTransition($post_id, $data)
+ {
+ $counter = 0; // Initialize.
+
+ $old_status = (string) get_post_status($post_id);
+ $new_status = (string) $data['post_status'];
+ /*
+ * When a post has a status of `pending` or `draft`, the `get_permalink()` function
+ * does not return a friendly permalink and therefore `autoClearPostCache()` will
+ * have no way of building a path to the cache file that should be cleared as part of
+ * this post status transition. To get around this, we temporarily store the permalink
+ * in $this->pre_post_update_post_permalink for `autoClearPostCache()` to use.
+ *
+ * See also: %3$s
; auto-clearing.', 'comet-cache'), esc_html($this->i18nFiles($_term_counter)), esc_html($_term['taxonomy_label']), esc_html($_term['term_name'])), ['combinable' => true]);
+ ++$enqueued_notices; // Increment enqueued notices counter.
+ }
+ }
+ unset($_term, $_term_regex, $_term_counter); // Housekeeping.
+
+ $counter += $this->autoClearXmlFeedsCache('post-terms', $post_id);
+
+ return $counter;
+ }
+}
diff --git a/src/includes/traits/Plugin/WcpUpdaterUtils.php b/src/includes/traits/Plugin/WcpUpdaterUtils.php
new file mode 100644
index 0000000..4e5b2b9
--- /dev/null
+++ b/src/includes/traits/Plugin/WcpUpdaterUtils.php
@@ -0,0 +1,103 @@
+autoClearCache();
+ }
+ break; // Break switch.
+
+ case 'theme': // Theme upgrade.
+
+ $current_active_theme = wp_get_theme();
+ $current_active_theme_parent = $current_active_theme->parent();
+ $multi_theme_update = $single_theme_update = false;
+ $upgrading_active_parent_theme = $upgrading_active_theme = false;
+
+ if (!empty($data['bulk']) && !empty($data['themes']) && is_array($data['themes'])) {
+ $multi_theme_update = true;
+ } elseif (!empty($data['theme']) && is_string($data['theme'])) {
+ $single_theme_update = true;
+ }
+ if ($multi_theme_update) {
+ foreach ($data['themes'] as $_theme) {
+ if (!$_theme || !is_string($_theme) || !($_theme_obj = wp_get_theme($_theme))) {
+ continue; // Unable to acquire theme object instance.
+ }
+ if ($current_active_theme_parent && $current_active_theme_parent->get_stylesheet() === $_theme_obj->get_stylesheet()) {
+ $upgrading_active_parent_theme = true;
+ break; // Got what we needed here.
+ } elseif ($current_active_theme->get_stylesheet() === $_theme_obj->get_stylesheet()) {
+ $upgrading_active_theme = true;
+ break; // Got what we needed here.
+ }
+ }
+ unset($_theme, $_theme_obj); // Housekeeping.
+ } elseif ($single_theme_update && ($_theme_obj = wp_get_theme($data['theme']))) {
+ if ($current_active_theme_parent && $current_active_theme_parent->get_stylesheet() === $_theme_obj->get_stylesheet()) {
+ $upgrading_active_parent_theme = true;
+ } elseif ($current_active_theme->get_stylesheet() === $_theme_obj->get_stylesheet()) {
+ $upgrading_active_theme = true;
+ }
+ }
+ unset($_theme_obj); // Housekeeping.
+
+ if ($upgrading_active_theme || $upgrading_active_parent_theme) {
+ $counter += $this->autoClearCache();
+ }
+ break; // Break switch.
+
+ case 'core': // Core upgrade.
+ default: // Or any other sort of upgrade.
+ $counter += $this->autoClearCache();
+ break; // Break switch.
+ }
+ }
+}
diff --git a/src/includes/traits/Plugin/WcpUtils.php b/src/includes/traits/Plugin/WcpUtils.php
new file mode 100644
index 0000000..2bdf1a4
--- /dev/null
+++ b/src/includes/traits/Plugin/WcpUtils.php
@@ -0,0 +1,383 @@
+disableAutoWipeCacheRoutines()) {
+ return $counter; // Nothing to do.
+ }
+ @set_time_limit(1800); // @TODO Display a warning.
+
+ if (is_dir($cache_dir = $this->cacheDir())) {
+ $regex = $this->assembleCachePathRegex('', '.+');
+ $counter += $this->wipeFilesFromCacheDir($regex);
+ }
+
+
+
+
+
+ return $counter;
+ }
+
+ // @codingStandardsIgnoreStart
+ /*
+ * Back compat. alias for autoClearUserCache()
+ */
+ public function wipe_cache()
+ { // @codingStandardsIgnoreEnd
+ return call_user_func_array([$this, 'wipeCache'], func_get_args());
+ }
+
+ /**
+ * Clears cache files (current blog).
+ *
+ * @since 150422 Rewrite.
+ *
+ * @param bool $manually TRUE if clearing is done manually.
+ *
+ * @throws \Exception If a clearing failure occurs.
+ *
+ * @return int Total files cleared by this routine.
+ */
+ public function clearCache($manually = false)
+ {
+ $counter = 0; // Initialize.
+
+ if (!$manually && $this->disableAutoClearCacheRoutines()) {
+ return $counter; // Nothing to do.
+ }
+ @set_time_limit(1800); // @TODO Display a warning.
+
+ if (is_dir($cache_dir = $this->cacheDir())) {
+ $regex = $this->buildHostCachePathRegex('', '.+');
+ $counter += $this->clearFilesFromHostCacheDir($regex);
+ }
+
+
+
+
+
+ return $counter;
+ }
+
+ // @codingStandardsIgnoreStart
+ /*
+ * Back compat. alias for clearCache()
+ */
+ public function clear_cache()
+ { // @codingStandardsIgnoreEnd
+ return call_user_func_array([$this, 'clearCache'], func_get_args());
+ }
+
+ /**
+ * Purges expired cache files (current blog).
+ *
+ * @since 150422 Rewrite.
+ *
+ * @param bool $manually TRUE if purging is done manually.
+ *
+ * @throws \Exception If a purge failure occurs.
+ *
+ * @return int Total files purged by this routine.
+ */
+ public function purgeCache($manually = false)
+ {
+ $counter = 0; // Initialize.
+
+ if (!$manually && $this->disableAutoPurgeCacheRoutines()) {
+ return $counter; // Nothing to do.
+ }
+ @set_time_limit(1800); // @TODO Display a warning.
+
+ if (is_dir($cache_dir = $this->cacheDir())) {
+ $regex = $this->buildHostCachePathRegex('', '.+');
+ $counter += $this->purgeFilesFromHostCacheDir($regex);
+ }
+
+ return $counter;
+ }
+
+ // @codingStandardsIgnoreStart
+ /*
+ * Back compat. alias for purgeCache()
+ */
+ public function purge_cache()
+ { // @codingStandardsIgnoreEnd
+ return call_user_func_array([$this, 'purgeCache'], func_get_args());
+ }
+
+ /**
+ * Wurges (purges) all expired cache files; like wipe, but expired files only.
+ *
+ * @since 151002 Look at entire cache directory.
+ *
+ * @param bool $manually TRUE if wurging is done manually.
+ *
+ * @throws \Exception If a wurge failure occurs.
+ *
+ * @return int Total files wurged by this routine.
+ */
+ public function wurgeCache($manually = false)
+ {
+ $counter = 0; // Initialize.
+
+ if (!$manually && $this->disableAutoPurgeCacheRoutines()) {
+ return $counter; // Nothing to do.
+ }
+ @set_time_limit(1800); // @TODO Display a warning.
+
+ if (is_dir($cache_dir = $this->cacheDir())) {
+ $regex = $this->assembleCachePathRegex('', '.+');
+ $counter += $this->wurgeFilesFromCacheDir($regex);
+ }
+
+ return $counter;
+ }
+
+ /**
+ * Automatically wipes out all cache files.
+ *
+ * @attaches-to Nothing at this time.
+ *
+ * @since 150422 Rewrite.
+ *
+ * @return int Total files wiped by this routine (if any).
+ *
+ * @note Unlike many of the other `auto_` methods, this one is NOT currently attached to any hooks.
+ * This is called upon whenever options are saved and/or restored though.
+ */
+ public function autoWipeCache()
+ {
+ $counter = 0; // Initialize.
+
+ if (!is_null($done = &$this->cacheKey('autoWipeCache'))) {
+ return $counter; // Already did this.
+ }
+ $done = true; // Flag as having been done.
+
+ if (!$this->options['enable']) {
+ return $counter; // Nothing to do.
+ }
+ if ($this->disableAutoWipeCacheRoutines()) {
+ return $counter; // Nothing to do.
+ }
+ $counter += $this->wipeCache();
+
+ if ($counter && is_admin() && (!IS_PRO || $this->options['change_notifications_enable'])) {
+ $this->enqueueNotice(sprintf(__('Detected significant changes that require a full wipe of the cache. Found %1$s in the cache; auto-wiping.', 'comet-cache'), esc_html($this->i18nFiles($counter))), ['combinable' => true]);
+ }
+ return $counter;
+ }
+
+ /**
+ * Automatically clears all cache files (current host).
+ *
+ * @attaches-to `switch_theme` hook.
+ *
+ * @attaches-to `wp_create_nav_menu` hook.
+ * @attaches-to `wp_update_nav_menu` hook.
+ * @attaches-to `wp_delete_nav_menu` hook.
+ *
+ * @attaches-to `create_term` hook.
+ * @attaches-to `edit_terms` hook.
+ * @attaches-to `delete_term` hook.
+ *
+ * @attaches-to `add_link` hook.
+ * @attaches-to `edit_link` hook.
+ * @attaches-to `delete_link` hook.
+ *
+ * @since 150422 Rewrite.
+ *
+ * @return int Total files cleared by this routine (if any).
+ *
+ * @note This is also called upon during plugin activation.
+ */
+ public function autoClearCache()
+ {
+ $counter = 0; // Initialize.
+
+ if (!is_null($done = &$this->cacheKey('autoClearCache'))) {
+ return $counter; // Already did this.
+ }
+ $done = true; // Flag as having been done.
+
+ if (!$this->options['enable']) {
+ return $counter; // Nothing to do.
+ }
+ if ($this->disableAutoClearCacheRoutines()) {
+ return $counter; // Nothing to do.
+ }
+ $counter += $this->clearCache();
+
+ if ($counter && is_admin() && (!IS_PRO || $this->options['change_notifications_enable'])) {
+ $this->enqueueNotice(sprintf(__('Detected important site changes that affect the entire cache. Found %1$s in the cache for this site; auto-clearing.', 'comet-cache'), esc_html($this->i18nFiles($counter))), ['combinable' => true]);
+ }
+ return $counter;
+ }
+
+ /**
+ * Automatically purges all cache files (current host).
+ *
+ * @attaches-to Nothing at this time.
+ *
+ * @since 151002 While working on directory stats.
+ *
+ * @return int Total files purged by this routine.
+ *
+ * @note Unlike many of the other `auto_` methods, this one is NOT currently attached to any hooks.
+ */
+ public function autoPurgeCache()
+ {
+ $counter = 0; // Initialize.
+
+ if (!is_null($done = &$this->cacheKey('autoPurgeCache'))) {
+ return $counter; // Already did this.
+ }
+ $done = true; // Flag as having been done.
+
+ if (!$this->options['enable']) {
+ return $counter; // Nothing to do.
+ }
+ if ($this->disableAutoPurgeCacheRoutines()) {
+ return $counter; // Nothing to do.
+ }
+ $counter += $this->purgeCache();
+
+ if ($counter && is_admin() && (!IS_PRO || $this->options['change_notifications_enable'])) {
+ $this->enqueueNotice(sprintf(__('Detected important site changes. Found %1$s in the cache for this site that were expired; auto-purging.', 'comet-cache'), esc_html($this->i18nFiles($counter))), ['combinable' => true]);
+ }
+ return $counter;
+ }
+
+ /**
+ * Automatically wurges all cache files.
+ *
+ * @attaches-to Nothing at this time.
+ *
+ * @since 151002 While working on directory stats.
+ *
+ * @return int Total files wurged by this routine.
+ *
+ * @note Unlike many of the other `auto_` methods, this one is NOT currently attached to any hooks.
+ */
+ public function autoWurgeCache()
+ {
+ $counter = 0; // Initialize.
+
+ if (!is_null($done = &$this->cacheKey('autoWurgeCache'))) {
+ return $counter; // Already did this.
+ }
+ $done = true; // Flag as having been done.
+
+ if (!$this->options['enable']) {
+ return $counter; // Nothing to do.
+ }
+ if ($this->disableAutoPurgeCacheRoutines()) {
+ return $counter; // Nothing to do.
+ }
+ $counter += $this->wurgeCache();
+
+ if ($counter && is_admin() && (!IS_PRO || $this->options['change_notifications_enable'])) {
+ $this->enqueueNotice(sprintf(__('Detected important site changes. Found %1$s in the cache that were expired; auto-purging.', 'comet-cache'), esc_html($this->i18nFiles($counter))), ['combinable' => true]);
+ }
+ return $counter;
+ }
+
+ /**
+ * Allows a site owner to disable the automatic cache wiping routines.
+ *
+ * This is done by filtering `'.__GLOBAL_NS__.'_disable_auto_wipe_cache_routines` to return TRUE,
+ * in which case this method returns TRUE, otherwise it returns FALSE.
+ *
+ * @since 150422 Rewrite.
+ *
+ * @return bool `TRUE` if disabled; and this also creates a dashboard notice in some cases.
+ */
+ public function disableAutoWipeCacheRoutines()
+ {
+ $is_disabled = (boolean) $this->applyWpFilters(GLOBAL_NS.'_disable_auto_wipe_cache_routines', false);
+
+ if ($is_disabled && is_admin() && (!IS_PRO || $this->options['change_notifications_enable'])) {
+ $this->enqueueMainNotice(
+ ''.
+ sprintf(__('%1$s: detected significant changes that would normally trigger cache wiping routines. However, cache wiping routines have been disabled by a site administrator. [?]', 'comet-cache'), esc_html(NAME))
+ );
+ }
+ return $is_disabled;
+ }
+
+ /**
+ * Allows a site owner to disable the automatic cache clearing routines.
+ *
+ * This is done by filtering `'.__GLOBAL_NS__.'_disable_auto_clear_cache_routines` to return TRUE,
+ * in which case this method returns TRUE, otherwise it returns FALSE.
+ *
+ * @since 150422 Rewrite.
+ *
+ * @return bool `TRUE` if disabled; and this also creates a dashboard notice in some cases.
+ */
+ public function disableAutoClearCacheRoutines()
+ {
+ $is_disabled = (boolean) $this->applyWpFilters(GLOBAL_NS.'_disable_auto_clear_cache_routines', false);
+
+ if ($is_disabled && is_admin() && (!IS_PRO || $this->options['change_notifications_enable'])) {
+ $this->enqueueMainNotice(
+ ''.
+ sprintf(__('%1$s: detected important site changes that would normally trigger cache clearing routines. However, cache clearing routines have been disabled by a site administrator. [?]', 'comet-cache'), esc_html(NAME))
+ );
+ }
+ return $is_disabled;
+ }
+
+ /**
+ * Allows a site owner to disable the automatic cache purging routines.
+ *
+ * This is done by filtering `'.__GLOBAL_NS__.'_disable_auto_purge_cache_routines` to return TRUE,
+ * in which case this method returns TRUE, otherwise it returns FALSE.
+ *
+ * @since 151002 While working on directory stats.
+ *
+ * @return bool `TRUE` if disabled; and this also creates a dashboard notice in some cases.
+ */
+ public function disableAutoPurgeCacheRoutines()
+ {
+ $is_disabled = (boolean) $this->applyWpFilters(GLOBAL_NS.'_disable_auto_purge_cache_routines', false);
+
+ if ($is_disabled && is_admin() && (!IS_PRO || $this->options['change_notifications_enable'])) {
+ $this->enqueueMainNotice(
+ ''.
+ sprintf(__('%1$s: detected important site changes that would normally trigger cache purging routines. However, cache purging routines have been disabled by a site administrator. [?]', 'comet-cache'), esc_html(NAME))
+ );
+ }
+ return $is_disabled;
+ }
+}
diff --git a/src/includes/traits/Plugin/WcpWooCommerceUtils.php b/src/includes/traits/Plugin/WcpWooCommerceUtils.php
new file mode 100644
index 0000000..78db58d
--- /dev/null
+++ b/src/includes/traits/Plugin/WcpWooCommerceUtils.php
@@ -0,0 +1,30 @@
+cacheKey('autoClearPostCacheOnWooCommerceSetStock'))) {
+ return $counter; // Already did this.
+ }
+ $done = true; // Flag as having been done.
+
+ if (class_exists('\\WooCommerce')) {
+ $counter += $this->autoClearPostCache($product->id);
+ }
+ }
+}
diff --git a/src/includes/traits/Shared/.build.php b/src/includes/traits/Shared/.build.php
new file mode 100644
index 0000000..38ee54d
--- /dev/null
+++ b/src/includes/traits/Shared/.build.php
@@ -0,0 +1,28 @@
+isAdvancedCache()) {
+ return null; // Not possible.
+ }
+ if (($blog_id = (integer) $blog_id) < 0) {
+ $blog_id = (integer) get_current_site()->blog_id;
+ }
+ if (!$blog_id) {
+ $blog_id = (integer) get_current_blog_id();
+ }
+ if (!$blog_id || $blog_id < 0) {
+ return null; // Not possible.
+ }
+ $details = get_blog_details($blog_id);
+
+ return is_object($details) ? $details : null;
+ }
+}
diff --git a/src/includes/traits/Shared/CacheDirUtils.php b/src/includes/traits/Shared/CacheDirUtils.php
new file mode 100644
index 0000000..2e75528
--- /dev/null
+++ b/src/includes/traits/Shared/CacheDirUtils.php
@@ -0,0 +1,651 @@
+isAdvancedCache()) {
+ $cache_dir = defined('COMET_CACHE_DIR') ? COMET_CACHE_DIR : '';
+ } elseif (!empty($this->cache_sub_dir)) {
+ $cache_dir = $this->wpContentBaseDirTo($this->cache_sub_dir);
+ }
+ if (empty($cache_dir)) {
+ throw new \Exception(__('Unable to determine cache directory location.', 'comet-cache'));
+ }
+ return rtrim($cache_dir, '/').($rel_path ? '/'.ltrim($rel_path) : '');
+ }
+
+ /**
+ * Wipe files from the cache directory (for all hosts/blogs);
+ * i.e., those that match a specific regex pattern.
+ *
+ * @since 151002 While working on directory stats.
+ *
+ * @param string $regex A regex pattern; see {@link deleteFilesFromCacheDir()}.
+ *
+ * @return int Total files wiped by this routine.
+ */
+ public function wipeFilesFromCacheDir($regex)
+ {
+ return $this->deleteFilesFromCacheDir($regex);
+ }
+
+ /**
+ * Clear files from the cache directory (for the current host);
+ * i.e., those that match a specific regex pattern.
+ *
+ * @since 150422 Rewrite. Updated 151002 w/ multisite compat. improvements.
+ *
+ * @param string $regex A regex pattern; see {@link deleteFilesFromHostCacheDir()}.
+ *
+ * @return int Total files cleared by this routine (if any).
+ */
+ public function clearFilesFromHostCacheDir($regex)
+ {
+ return $this->deleteFilesFromHostCacheDir($regex);
+ }
+
+ /**
+ * Wurge (purge) files from the cache directory (for all hosts/blogs);
+ * i.e., those that match a specific regex pattern.
+ *
+ * @since 151002 While working on directory stats.
+ *
+ * @param string $regex A regex pattern; see {@link deleteFilesFromCacheDir()}.
+ *
+ * @return int Total files wurged by this routine.
+ */
+ public function wurgeFilesFromCacheDir($regex)
+ {
+ return $this->deleteFilesFromCacheDir($regex, true);
+ }
+
+ /**
+ * Purge files from the cache directory (for the current host);
+ * i.e., those that match a specific regex pattern.
+ *
+ * @since 150422 Rewrite. Updated 151002 w/ multisite compat. improvements.
+ *
+ * @param string $regex A regex pattern; see {@link deleteFilesFromHostCacheDir()}.
+ *
+ * @return int Total files purged by this routine (if any).
+ */
+ public function purgeFilesFromHostCacheDir($regex)
+ {
+ return $this->deleteFilesFromHostCacheDir($regex, true);
+ }
+
+ /**
+ * Delete files from the cache directory (for all hosts/blogs);
+ * i.e., those that match a specific regex pattern.
+ *
+ * @since 150422 Rewrite. Updated 151002 w/ multisite compat. improvements.
+ *
+ * @param string $regex A `/[regex pattern]/`; relative to the cache directory.
+ * e.g. `/^http\/example\.com\/my\-slug(?:\/index)?(?:\.|\/(?:page\/[0-9]+|comment\-page\-[0-9]+)[.\/])/`
+ *
+ * Or, this can also be a full/absolute regex pattern against an absolute path;
+ * provided that it always starts with `/^`; including the full absolute cache/host directory path.
+ * e.g. `/^\/cache\/dir\/http\/example\.com\/my\-slug(?:\/index)?(?:\.|\/(?:page\/[0-9]+|comment\-page\-[0-9]+)[.\/])/`
+ * @param bool $check_max_age Check max age? i.e., use purge behavior?
+ *
+ * @throws \Exception If unable to delete a file for any reason.
+ * @return int Total files deleted by this routine (if any).
+ *
+ *
+ * @TODO Optimize this for multisite networks w/ a LOT of child blogs.
+ * @TODO Optimize this for extremely large sites. A LOT of files here could slow things down.
+ * This class member is currently used in wiping and purging for a network. So there is the potential for a LOT of files in a single scan.
+ * See also: ini_set('apc.cache_by_default', false);
to the top of your /wp-config.php
file. That will get rid of this message and allow Comet Cache to run without issue."
-msgstr ""
-
-#: plugin.php:44
-msgid "Or, contact your web hosting provider and ask about upgrading to PHP v5.5+; which includes the new OPcache extension for PHP. The new OPcache extension replaces APC in modern versions of PHP."
-msgstr ""
-
-#: plugin.php:46
-msgid "To learn more about this change, please see the announcement: PHP APC Extension No Longer Supported"
-msgstr ""
-
-#: plugin.php:66
-msgid "NOTICE: Comet Cache Will Require the PHP mbstring
Extension"
-msgstr ""
-
-#: plugin.php:67
-msgid "After March 1st, 2016 Comet Cache will require PHP Multibyte String support. It appears that your site is currently running PHP v%1$s without the mbstring
extension enabled. You will need to contact your web hosting company and have them enable the PHP mbstring
extension if you want to run the next version of Comet Cache."
-msgstr ""
-
-#: plugin.php:68
-msgid "The mbstring
extension provides Multibyte String support to PHP and is required to properly handle UTF-8 characters, which many sites now use. Without Multibyte String support, Comet Cache will be unstable. For that reason we are requiring the mbstring
extension to improve reliablity when caching and to prevent your site from experiencing unforeseen issues in the future."
-msgstr ""
-
-#: src/includes/classes/AbsBase.php:116
-msgid "Undefined overload property: `%1$s`."
-msgstr ""
-
-#: src/includes/classes/AbsBase.php:134
-msgid "Refused to set overload property: `%1$s`."
-msgstr ""
-
-#: src/includes/classes/AbsBase.php:151
-msgid "Refused to unset overload property: `%1$s`."
-msgstr ""
-
-#: src/includes/classes/AbsBaseAp.php:57
-msgid "Undefined method/closure: `%1$s`."
-msgstr ""
-
-#: src/includes/classes/Conflicts.php:89
-msgid "Pro"
-msgstr ""
-
-#: src/includes/classes/Conflicts.php:90
-msgid "Lite"
-msgstr ""
-
-#: src/includes/classes/Conflicts.php:95
-msgid "%1$s is NOT running. A conflicting plugin, %2$s, is currently active. Please deactivate the %2$s plugin to clear this message."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:30
-msgid "Wipe Cache (Start Fresh); clears the cache for all sites in this network at once!"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:32
-msgid "Wipe"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:34
-msgid "Clear Cache (Start Fresh)"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:34
-msgid "; affects the current site only."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:36
-msgid "Clear"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:39
-msgid "Restore default plugin options? You will lose all of your current settings! Are you absolutely sure about this?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:41
-msgid "Restore"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:43
-msgid "All Panels"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:50
-msgid "Pro Updater"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:51
-#: src/includes/classes/MenuPageOptions.php:73
-msgid "Newsletter"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:52
-#: src/includes/classes/MenuPageOptions.php:74
-msgid "Beta Testers"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:55
-#: src/includes/closures/Plugin/MenuPageUtils.php:120
-msgid "Preview Pro Features"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:56
-msgid "Pro Upgrade"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:62
-msgid "Support"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:65
-msgid "Community Forum"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:67
-msgid "Knowledge Base"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:68
-msgid "Blog"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:80
-msgid "%1$s™ Pro v%2$s"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:83
-#: src/includes/classes/MenuPageOptions.php:93
-msgid "update available"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:85
-#: src/includes/classes/MenuPageOptions.php:95
-msgid "changelog"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:90
-msgid "%1$s™ v%2$s"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:99
-#: src/includes/closures/Plugin/MenuPageUtils.php:73
-#: src/includes/closures/Plugin/MenuPageUtils.php:95
-msgid "Plugin Options"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:113
-msgid "Options updated successfully."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:118
-msgid "Default options successfully restored."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:123
-msgid "Cache wiped across all sites; recreation will occur automatically over time."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:129
-msgid "Cache cleared for main site; recreation will occur automatically over time."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:131
-msgid "Cache cleared for this site; recreation will occur automatically over time."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:137
-#: src/includes/classes/MenuPageOptions.php:142
-msgid "Failed to update your /.htaccess
file automatically. Most likely a permissions error. Please make sure it has permissions 644
or higher (perhaps 666
). Once you've done this, please try saving the %1$s options again."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:147
-msgid "It appears that your server is running NGINX and does not support .htaccess
rules. Please update your server configuration manually. If you've already updated your NGINX configuration, you can safely ignore this message."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:152
-msgid "Failed to update your /wp-config.php
file automatically. Please add the following line to your /wp-config.php
file (right after the opening <?php
tag; on it's own line). <?php
define('WP_CACHE', TRUE);
"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:157
-msgid "Failed to update your /wp-config.php
file automatically. Please remove the following line from your /wp-config.php
file, or set WP_CACHE
to a FALSE
value. define('WP_CACHE', TRUE);
"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:163
-msgid "Failed to update your /wp-content/advanced-cache.php
file. Cannot write stat file: %1$s/%2$s-advanced-cache
. Please be sure this directory exists (and that it's writable): %1$s
. Please use directory permissions 755
or higher (perhaps 777
). Once you've done this, please try again."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:165
-msgid "Failed to update your /wp-content/advanced-cache.php
file. Most likely a permissions error. Please create an empty file here: /wp-content/advanced-cache.php
(just an empty PHP file, with nothing in it); give it permissions 644
or higher (perhaps 666
). Once you've done this, please try again."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:171
-msgid "Failed to remove your /wp-content/advanced-cache.php
file. Most likely a permissions error. Please delete (or empty the contents of) this file: /wp-content/advanced-cache.php
."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:176
-msgid "close"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:177
-msgid "Pro Features (Preview) ~ New option panels below. Please explore before upgrading .Yes
and THEN deactivate & delete %1$s from the plugins menu in WordPress. This way %1$s will erase your options for the plugin, erase directories/files created by the plugin, remove the advanced-cache.php
file, terminate CRON jobs, etc. It erases itself from existence completely."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:237
-msgid "Safeguard my options and the cache (recommended)."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:238
-msgid "Yes, uninstall (completely erase) %1$s on plugin deletion."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:247
-msgid "Advanced Configuration (All Optional)"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:248
-msgid "Recommended for advanced site owners only; already pre-configured for most WP installs."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:257
-msgid "Manual Cache Clearing"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:261
-msgid "Clearing the Cache Manually"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:263
-msgid "Once %1$s is enabled, you will find this new option in your WordPress Admin Bar (screenshot on right). Clicking this button will clear the cache and you can start fresh at anytime (e.g., you can do this manually; and as often as you wish)."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:264
-msgid "Depending on the structure of your site, there could be many reasons to clear the cache. However, the most common reasons are related to Post/Page edits or deletions, Category/Tag edits or deletions, and Theme changes. %1$s handles most scenarios all by itself. However, many site owners like to clear the cache manually; for a variety of reasons (just to force a refresh)."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:266
-msgid "Yes, enable "Clear Cache" button in admin bar"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:267
-msgid "No, I don't intend to clear the cache manually."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:270
-msgid "w/ dropdown options."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:271
-msgid "w/ dropdown options in split menu."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:272
-msgid "w/o dropdown options."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:277
-msgid "Also allow Child Sites in a Network to clear the cache from their Admin Bar?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:278
-msgid "In a Multisite Network, each child site can clear its own cache. If you want child sites to see the \"Clear Cache\" button in their WordPress Admin Bar, you can specify a comma-delimited list of Roles and/or Capabilities that are allowed. For example, if I want Administrators to be capable of clearing the cache from their Admin Bar, I could enter administrator
here. If I also want to allow Editors, I can use a comma-delimited list: administrator,editor
. Or, I could use a single Capability of: edit_others_posts
; which covers both Administrators & Editors at the same time."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:280
-#: src/includes/classes/MenuPageOptions.php:471
-msgid "Note: As a security measure, in addition to the Role(s) and/or Capabilities that you list here, each child site owner must also have the ability to %1$s
."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:285
-msgid "Also allow others to clear the cache from their Admin Bar?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:286
-msgid "If you want others to see the \"Clear Cache\" button in their WordPress Admin Bar, you can specify a comma-delimited list of Roles and/or Capabilities that are allowed. For example, if I want Editors to be capable of clearing the cache from their Admin Bar, I could enter editor
here. If I also want to allow Authors, I can use a comma-delimited list: editor,author
. Or, I could use a single Capability of: publish_posts
; which covers both Editors & Authors at the same time."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:288
-#: src/includes/classes/MenuPageOptions.php:479
-msgid "Note: As a security measure, in addition to the Role(s) and/or Capabilities that you list here, each user must also have the ability to %1$s
."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:294
-msgid "Clear the PHP OPcache Too?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:295
-msgid "If you clear the cache manually, do you want %1$s to clear the PHP OPcache too? This is not necessary, but if you want a truly clean start, this will clear all PHP files in the server's opcode cache also. Note: If you don't already know what the PHP OPcache is, it is suggested that you leave this disabled. It really is not necessary. This is just an added feature for advanced users."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:297
-msgid "No, I don't use the PHP OPcache extension; or, I don't want the opcode cache cleared."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:298
-msgid "Yes, if the PHP OPcache extension is enabled, also clear the entire PHP opcode cache."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:303
-msgid "Clear the s2Clean Cache Too?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:304
-msgid "If the s2Clean theme is installed, and you clear the cache manually, %1$s can clear the s2Clean Markdown cache too (if you've enabled Markdown processing with s2Clean)."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:306
-msgid "Yes, if the s2Clean theme is installed, also clear s2Clean-related caches."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:307
-msgid "No, I don't use s2Clean; or, I don't want s2Clean-related caches cleared."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:311
-msgid "Evaluate Custom PHP Code when Clearing the Cache?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:312
-msgid "If you have any custom routines you'd like to process when the cache is cleared manually, please enter PHP code here. If your PHP code outputs a message, it will be displayed along with any other notes from %1$s itself. This feature is intended for developers, and it may come in handy if you need to clear any system caches not already covered by %1$s configuration options."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:314
-msgid "Example: <?php apc_clear_cache(); echo '<p>Also cleared APC cache.</p>'; ?>
"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:317
-msgid "Clear the CDN Cache Too?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:318
-msgid "If you clear the cache manually, do you want %1$s to automatically bump the CDN invalidation counter too? i.e., automatically increment the ?%2$s=[counter]
in all static CDN URLs?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:320
-msgid "No, I don't use Static CDN Filters; or, I don't want the CDN cache cleared."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:321
-msgid "Yes, if Static CDN Filters are enabled, also clear the CDN cache."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:332
-msgid "Automatic Cache Clearing"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:337
-msgid "Clearing the Cache Automatically"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:339
-msgid "This is built into the %1$s plugin; i.e., this functionality is \"always on\". If you edit a Post/Page (or delete one), %1$s will automatically clear the cache file(s) associated with that content. This way a new updated version of the cache will be created automatically the next time this content is accessed. Simple updates like this occur each time you make changes in the Dashboard, and %1$s will notify you of these as they occur. %1$s monitors changes to Posts (of any kind, including Pages), Categories, Tags, Links, Themes (even Users), and more."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:343
-msgid "Yes, enable %1$s notifications in the Dashboard when changes are detected & one or more cache files are cleared automatically."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:344
-msgid "No, I don't want to know (don't really care) what %1$s is doing behind-the-scene."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:349
-msgid "Primary Page Options"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:351
-msgid "Auto-Clear Designated \"Home Page\" Too?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:352
-msgid "On many sites, the Home Page (aka: the Front Page) offers an archive view of all Posts (or even Pages). Therefore, if a single Post/Page is changed in some way; and %1$s clears/resets the cache for a single Post/Page, would you like %1$s to also clear any existing cache files for the \"Home Page\"?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:354
-msgid "Yes, if any single Post/Page is cleared/reset; also clear the \"Home Page\"."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:355
-msgid "No, my Home Page does not provide a list of Posts/Pages; e.g., this is not necessary."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:357
-msgid "Auto-Clear Designated \"Posts Page\" Too?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:358
-msgid "On many sites, the Posts Page (aka: the Blog Page) offers an archive view of all Posts (or even Pages). Therefore, if a single Post/Page is changed in some way; and %1$s clears/resets the cache for a single Post/Page, would you like %1$s to also clear any existing cache files for the \"Posts Page\"?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:360
-msgid "Yes, if any single Post/Page is cleared/reset; also clear the \"Posts Page\"."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:361
-msgid "No, I don't use a separate Posts Page; e.g., my Home Page IS my Posts Page."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:365
-msgid "Author, Archive, and Tag/Term Options"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:367
-msgid "Auto-Clear \"Author Page\" Too?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:368
-msgid "On many sites, each author has a related \"Author Page\" that offers an archive view of all posts associated with that author. Therefore, if a single Post/Page is changed in some way; and %1$s clears/resets the cache for a single Post/Page, would you like %1$s to also clear any existing cache files for the related \"Author Page\"?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:370
-msgid "Yes, if any single Post/Page is cleared/reset; also clear the \"Author Page\"."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:371
-msgid "No, my site doesn't use multiple authors and/or I don't have any \"Author Page\" archive views."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:374
-msgid "Auto-Clear \"Category Archives\" Too?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:375
-msgid "On many sites, each post is associated with at least one Category. Each category then has an archive view that contains all the posts within that category. Therefore, if a single Post/Page is changed in some way; and %1$s clears/resets the cache for a single Post/Page, would you like %1$s to also clear any existing cache files for the associated Category archive views?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:377
-msgid "Yes, if any single Post/Page is cleared/reset; also clear the associated Category archive views."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:378
-msgid "No, my site doesn't use Categories and/or I don't have any Category archive views."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:381
-msgid "Auto-Clear \"Tag Archives\" Too?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:382
-msgid "On many sites, each post may be associated with at least one Tag. Each tag then has an archive view that contains all the posts assigned that tag. Therefore, if a single Post/Page is changed in some way; and %1$s clears/resets the cache for a single Post/Page, would you like %1$s to also clear any existing cache files for the associated Tag archive views?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:384
-msgid "Yes, if any single Post/Page is cleared/reset; also clear the associated Tag archive views."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:385
-msgid "No, my site doesn't use Tags and/or I don't have any Tag archive views."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:388
-msgid "Auto-Clear \"Custom Term Archives\" Too?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:389
-msgid "Most sites do not use any custom Terms so it should be safe to leave this disabled. However, if your site uses custom Terms and they have their own Term archive views, you may want to clear those when the associated post is cleared. Therefore, if a single Post/Page is changed in some way; and %1$s clears/resets the cache for a single Post/Page, would you like %1$s to also clear any existing cache files for the associated Tag archive views?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:391
-msgid "Yes, if any single Post/Page is cleared/reset; also clear any associated custom Term archive views."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:392
-msgid "No, my site doesn't use any custom Terms and/or I don't have any custom Term archive views."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:395
-msgid "Auto-Clear \"Custom Post Type Archives\" Too?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:396
-msgid "Most sites do not use any Custom Post Types so it should be safe to disable this option. However, if your site uses Custom Post Types and they have their own Custom Post Type archive views, you may want to clear those when any associated post is cleared. Therefore, if a single Post with a Custom Post Type is changed in some way; and %1$s clears/resets the cache for that post, would you like %1$s to also clear any existing cache files for the associated Custom Post Type archive views?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:398
-msgid "Yes, if any single Post with a Custom Post Type is cleared/reset; also clear any associated Custom Post Type archive views."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:399
-msgid "No, my site doesn't use any Custom Post Types and/or I don't have any Custom Post Type archive views."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:403
-msgid "Feed-Related Options"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:405
-msgid "Auto-Clear \"RSS/RDF/ATOM Feeds\" Too?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:406
-msgid "If you enable Feed Caching (below), this can be quite handy. If enabled, when you update a Post/Page, approve a Comment, or make other changes where %1$s can detect that certain types of Feeds should be cleared to keep your site up-to-date, then %1$s will do this for you automatically. For instance, the blog's master feed, the blog's master comments feed, feeds associated with comments on a Post/Page, term-related feeds (including mixed term-related feeds), author-related feeds, etc. Under various circumstances (i.e., as you work in the Dashboard) these can be cleared automatically to keep your site up-to-date."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:408
-msgid "Yes, automatically clear RSS/RDF/ATOM Feeds from the cache when certain changes occur."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:409
-msgid "No, I don't have Feed Caching enabled, or I prefer not to automatically clear Feeds."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:413
-msgid "Sitemap-Related Options"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:415
-msgid "Auto-Clear \"XML Sitemaps\" Too?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:416
-msgid "If you're generating XML Sitemaps with a plugin like Google XML Sitemaps, you can tell %1$s to automatically clear the cache of any XML Sitemaps whenever it clears a Post/Page. Note: This does NOT clear the XML Sitemap itself of course, only the cache. The point being, to clear the cache and allow changes to a Post/Page to be reflected by a fresh copy of your XML Sitemap; sooner rather than later."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:418
-msgid "Yes, if any single Post/Page is cleared/reset; also clear the cache for any XML Sitemaps."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:419
-msgid "No, my site doesn't use any XML Sitemaps and/or I prefer NOT to clear the cache for XML Sitemaps."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:422
-msgid "XML Sitemap Patterns... A default value of /sitemap**.xml
covers all XML Sitemaps for most installations. However, you may customize this further if you deem necessary. Please list one pattern per line. These XML Sitemap Pattern searches are performed against the REQUEST_URI. A wildcard **
character can also be used when necessary; e.g., /sitemap**.xml
(where **
= 0 or more characters of any kind, including /
slashes). Other special characters include: *
= 0 or more characters that are NOT a slash /
; ^
= beginning of the string; $
= end of the string. To learn more about this syntax, please see this KB article."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:425
-msgid "In a Multisite Network, each child blog (whether it be a sub-domain, a sub-directory, or a mapped domain); will automatically change the leading http://[sub.]domain/[sub-directory]
used in pattern matching. In short, there is no need to add sub-domains or sub-directories for each child blog in these patterns. Please include only the REQUEST_URI (i.e., the path) which leads to the XML Sitemap on all child blogs in the network."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:431
-msgid "Misc. Auto-Clear Options"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:432
-msgid "Auto-Clear a List of Custom URLs Too?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:433
-msgid "When you update a Post/Page, approve a Comment, or make other changes where %1$s can detect that a Post/Page cache should be cleared to keep your site up-to-date; then %1$s will also clear a list of custom URLs that you list here. Please list one URL per line. A wildcard *
character can also be used when necessary; e.g., /category/abc-followed-by-*
(where *
= 0 or more characters that are NOT a slash /
). Other special characters include: **
= 0 or more characters of any kind, including /
slashes; ^
= beginning of the string; $
= end of the string. To learn more about this syntax, please see this KB article."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:446
-msgid "Cache-Related Statistics"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:451
-msgid "Enable Cache-Related Stats & Charts?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:452
-msgid "%1$s can collect and display cache-related statistics (including charts). Stats are displayed in the WordPress Admin Bar, and also in your Dashboard under: %1$s → Stats/Charts. Cache-related stats provide you with a quick look at what's happening behind-the-scenes. Your site grows faster and faster as the cache grows larger in size."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:454
-msgid "Yes, enable stats collection & the menu page in WordPress for viewing stats."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:455
-msgid "No, I have a VERY large site and I want to avoid any unnecessary directory scans."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:457
-msgid "Note: %1$s does a great job of collecting stats, in ways that don't cause a performance issue. In addition, as your cache grows larger than several hundred files in total size, statistics are collected less often and at longer intervals. All of that being said, if you run a VERY large site (e.g., more than 20K posts), you might want to disable stats collection in favor of blazing fast speeds not impeded by any directory scans needed to collect stats."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:461
-msgid "Show Stats in the WordPress Admin Bar?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:463
-msgid "Yes, enable stats in the WordPress admin bar."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:464
-msgid "No, I'll review stats from the menu page in WordPress if I need to."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:468
-msgid "Allow Child Sites in a Network to See Stats in Admin Bar?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:469
-msgid "In a Multisite Network, each child site has stats of its own. If you want child sites to see cache-related stats in their WordPress Admin Bar, you can specify a comma-delimited list of Roles and/or Capabilities that are allowed to see stats. For example, if I want the Administrator to see stats in their Admin Bar, I could enter administrator
here. If I also want to show stats to Editors, I can use a comma-delimited list: administrator,editor
. Or, I could use a single Capability of: edit_others_posts
; which covers both Administrators & Editors at the same time."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:476
-msgid "Allow Others to See Stats in Admin Bar?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:477
-msgid "If you want others to see cache-related stats in their WordPress Admin Bar, you can specify a comma-delimited list of Roles and/or Capabilities that are allowed to see stats. For example, if I want Editors to see stats in their Admin Bar, I could enter editor
here. If I also want to show stats to Authors, I can use a comma-delimited list: editor,author
. Or, I could use a single Capability of: publish_posts
; which covers both Editors & Authors at the same time."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:493
-msgid "Cache Directory"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:497
-msgid "Base Cache Directory (Must be Writable; i.e., Permissions 755
or Higher)"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:498
-msgid "This is where %1$s will store the cached version of your site. If you're not sure how to deal with directory permissions, don't worry too much about this. If there is a problem, %1$s will let you know about it. By default, this directory is created by %1$s and the permissions are setup automatically. In most cases there is nothing more you need to do."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:509
-msgid "Cache Expiration Time"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:514
-msgid "Automatic Expiration Time (Max Age)"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:515
-msgid "If you don't update your site much, you could set this to 6 months
and optimize everything even further. The longer the Cache Expiration Time is, the greater your performance gain. Alternatively, the shorter the Expiration Time, the fresher everything will remain on your site. A default value of 7 days
(recommended); is a good conservative middle-ground."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:516
-msgid "Keep in mind that your Expiration Time is only one part of the big picture. %1$s will also clear the cache automatically as changes are made to the site (i.e., you edit a post, someone comments on a post, you change your theme, you add a new navigation menu item, etc., etc.). Thus, your Expiration Time is really just a fallback; e.g., the maximum amount of time that a cache file could ever possibly live."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:517
-msgid "All of that being said, you could set this to just 60 seconds
and you would still see huge differences in speed and performance. If you're just starting out with %1$s (perhaps a bit nervous about old cache files being served to your visitors); you could set this to something like 30 minutes
and experiment with it while you build confidence in %1$s. It's not necessary to do so, but many site owners have reported this makes them feel like they're more-in-control when the cache has a short expiration time. All-in-all, it's a matter of preference ."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:519
-msgid "Tip: the value that you specify here MUST be compatible with PHP's strtotime()
function. Examples: 30 seconds
, 2 hours
, 7 days
, 6 months
, 1 year
."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:520
-msgid "Note: %1$s will never serve a cache file that is older than what you specify here (even if one exists in your cache directory; stale cache files are never used). In addition, a WP Cron job will automatically cleanup your cache directory (once per hour); purging expired cache files periodically. This prevents a HUGE cache from building up over time, creating a potential storage issue."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:524
-msgid "Cache Cleanup Schedule"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:525
-msgid "If you have an extremely large site and you lower the default Cache Expiration Time of 7 days
, expired cache files can build up more quickly. By default, %1$s cleans up expired cache files via WP Cron at an hourly
interval, but you can tell %1$s to use a custom Cache Cleanup Schedule below to run the cleanup process more or less frequently, depending on your specific needs."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:537
-msgid "Disable Cache Expiration If Server Load Average is High?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:538
-msgid "If you have high traffic at certain times of the day, %1$s can be told to check the current load average via sys_getloadavg()
. If your server's load average has been high in the last 15 minutes or so, cache expiration is disabled automatically to help reduce stress on the server; i.e., to avoid generating a new version of the cache while the server is very busy."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:539
-msgid "To enable this functionality you should first determine what a high load average is for your server. If you log into your machine via SSH you can run the top
command to get a feel for what a high load average looks like. Once you know the number, you can enter it in the field below; e.g., 1.05
might be a high load average for a server with one CPU. See also: Understanding Load Average"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:542
-msgid "Note: It appears that your server is running Windows. The sys_getloadavg()
function has not been implemented in PHP for Windows servers yet."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:544
-msgid "Note: sys_getloadavg()
has been disabled by your web hosting company or is not available on your server."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:557
-msgid "Client-Side Cache"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:562
-msgid "Allow Double-Caching In The Client-Side Browser?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:563
-msgid "Recommended setting: No
(for membership sites, very important). Otherwise, Yes
would be better (if users do NOT log in/out of your site)."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:564
-msgid "%1$s handles content delivery through its ability to communicate with a browser using PHP. If you allow a browser to (cache) the caching system itself, you are momentarily losing some control; and this can have a negative impact on users that see more than one version of your site; e.g., one version while logged-in, and another while NOT logged-in. For instance, a user may log out of your site, but upon logging out they report seeing pages on the site which indicate they are STILL logged in (even though they're not — that's bad). This can happen if you allow a client-side cache, because their browser may cache web pages they visited while logged into your site which persist even after logging out. Sending no-cache headers will work to prevent this issue."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:565
-msgid "All of that being said, if all you care about is blazing fast speed and users don't log in/out of your site (only you do); you can safely set this to Yes
(recommended in this case). Allowing a client-side browser cache will improve speed and reduce outgoing bandwidth when this option is feasible."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:567
-msgid "No, prevent a client-side browser cache (safest option)."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:568
-msgid "Yes, I will allow a client-side browser cache of pages on the site."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:570
-msgid "Tip: Setting this to No
is highly recommended when running a membership plugin like s2Member (as one example). In fact, many plugins like s2Member will send nocache_headers() on their own, so your configuration here will likely be overwritten when you run such plugins (which is better anyway). In short, if you run a membership plugin, you should NOT allow a client-side browser cache."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:571
-msgid "Tip: Setting this to No
will NOT impact static content; e.g., CSS, JS, images, or other media. This setting pertains only to dynamic PHP scripts which produce content generated by WordPress."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:572
-msgid "Advanced Tip: if you have this set to No
, but you DO want to allow a few special URLs to be cached by the browser; you can add this parameter to your URL ?%2$sABC=1
. This tells %1$s that it's OK for the browser to cache that particular URL. In other words, the %2$sABC=1
parameter tells %1$s NOT to send no-cache headers to the browser."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:573
-msgid "Exclusion Patterns for Client-Side Caching"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:574
-msgid "When you enable Client-Side Caching above, you may want to prevent certain pages on your site from being cached by a client-side browser. This is where you will enter those if you need to (one per line). Searches are performed against the REQUEST_URI
; i.e., /path/?query
(caSe insensitive). So, don't put in full URLs here, just word fragments found in the file path (or query string) is all you need, excluding the http:// and domain name. A wildcard *
character can also be used when necessary; e.g., /category/abc-followed-by-*
(where *
= 0 or more characters that are NOT a slash /
). Other special characters include: **
= 0 or more characters of any kind, including /
slashes; ^
= beginning of the string; $
= end of the string. To learn more about this syntax, please see this KB article."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:576
-#: src/includes/classes/MenuPageOptions.php:700
-#: src/includes/classes/MenuPageOptions.php:861
-msgid "Tip: let's use this example URL: http://www.example.com/post/example-post-123
. To exclude this URL, you would put this line into the field above: /post/example-post-123
. Or, you could also just put in a small fragment, like: example
or example-*-123
and that would exclude any URI containing that word fragment."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:577
-#: src/includes/classes/MenuPageOptions.php:701
-#: src/includes/classes/MenuPageOptions.php:719
-#: src/includes/classes/MenuPageOptions.php:737
-#: src/includes/classes/MenuPageOptions.php:853
-#: src/includes/classes/MenuPageOptions.php:857
-#: src/includes/classes/MenuPageOptions.php:862
-#: src/includes/classes/MenuPageOptions.php:986
-msgid "Note: please remember that your entries here should be formatted as a line-delimited list; e.g., one exclusion pattern per line."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:588
-msgid "Logged-In Users"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:593
-msgid "Caching Enabled for Logged-In Users & Comment Authors?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:594
-msgid "This should almost ALWAYS be set to No
. Most sites will NOT want to cache content generated while a user is logged-in. Doing so could result in a cache of dynamic content generated specifically for a particular user, where the content being cached may contain details that pertain only to the user that was logged-in when the cache was generated. Imagine visiting a website that says you're logged-in as Billy Bob (but you're not Billy Bob; NOT good). In short, do NOT turn this on unless you know what you're doing."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:596
-msgid "Exception (Membership Sites): If you run a site with many users and the majority of your traffic comes from users who ARE logged-in, please choose: Yes (maintain separate cache)
. %1$s will operate normally; but when a user is logged-in, the cache is user-specific. %1$s will intelligently refresh the cache when/if a user submits a form on your site with the GET or POST method. Or, if you make changes to their account (or another plugin makes changes to their account); including user option|meta additions, updates & deletions too. However, please note that enabling this feature (e.g., user-specific cache entries); will eat up MUCH more disk space. That being said, the benefits of this feature for most sites will outweigh the disk overhead (e.g., it's NOT an issue in most cases). Unless you are short on disk space (or you have MANY thousands of users), the disk overhead is neglible."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:598
-msgid "No, do NOT cache; or serve a cache file when a user is logged-in (safest option)."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:599
-msgid "Yes, and maintain a separate cache for each user (recommended for membership sites)."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:602
-msgid "Yes, but DON'T maintain a separate cache for each user (I know what I'm doing)."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:606
-msgid "Warning: Whenever you enable caching for logged-in users (without a separate cache for each user), the WordPress Admin Bar must be disabled to prevent one user from seeing another user's details in the Admin Bar. Given your current configuration, %1$s will automatically hide the WordPress Admin Bar on the front-end of your site."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:608
-msgid "Note: For most sites, the majority of their traffic (if not all of their traffic) comes from visitors who are not logged in, so disabling the cache for logged-in users is NOT ordinarily a performance issue. When a user IS logged-in, disabling the cache is considered ideal, because a logged-in user has a session open with your site; and the content they view should remain very dynamic in this scenario."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:609
-msgid "Note: This setting includes some users who AREN'T actually logged into the system, but who HAVE authored comments recently. %1$s includes comment authors as part of it's logged-in user check. This way comment authors will be able to see updates to the comment thread immediately; and, so that any dynamically-generated messages displayed by your theme will work as intended. In short, %1$s thinks of a comment author as a logged-in user, even though technically they are not. ~ Users who gain access to password-protected Posts/Pages are also included."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:611
-msgid "Static CDN Filters Enabled for Logged-In Users & Comment Authors?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:612
-msgid "While this defaults to a value of No
, it should almost always be set to Yes
. This value defaults to No
only because Logged-In User caching (see above) defaults to No
and setting this value to Yes
by default can cause confusion for some users. Once you understand that Static CDN Filters can be applied safely for all visitors (logged-in or not logged-in), please choose Yes
in the dropdown below. If you are not using Static CDN Filters, the value below is ignored."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:614
-msgid "No, disable Static CDN Filters when a user is logged-in."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:615
-msgid "Yes, enable Static CDN Filters for logged-in users (recommended) ."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:617
-msgid "Note: Static CDN Filters serve static resources. Static resources, are, simply put, static. Thus, it is not a problem to cache these resources for any visitor (logged-in or not logged-in). To avoid confusion, this defaults to a value of No
, and we ask that you set it to Yes
on your own so that you'll know to expect this behavior; i.e., that static resources will always be served from the CDN (logged-in or not logged-in) even though Logged-In User caching may be disabled above."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:627
-msgid "GET Requests"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:632
-msgid "Caching Enabled for GET (Query String) Requests?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:633
-msgid "This should almost ALWAYS be set to No
. UNLESS, you're using unfriendly Permalinks. In other words, if all of your URLs contain a query string (e.g., /?key=value
); you're using unfriendly Permalinks. Ideally, you would refrain from doing this; and instead, update your Permalink options immediately; which also optimizes your site for search engines. That being said, if you really want to use unfriendly Permalinks, and ONLY if you're using unfriendly Permalinks, you should set this to Yes
; and don't worry too much, the sky won't fall on your head :-)"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:635
-msgid "No, do NOT cache (or serve a cache file) when a query string is present."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:636
-msgid "Yes, I would like to cache URLs that contain a query string."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:638
-msgid "Note: POST requests (i.e., forms with method="post"
) are always excluded from the cache, which is the way it should be. Any POST/PUT/DELETE request should NEVER (ever) be cached. CLI (and self-serve) requests are also excluded from the cache (always). A CLI request is one that comes from the command line; commonly used by CRON jobs and other automated routines. A self-serve request is an HTTP connection established from your site -› to your site. For instance, a WP Cron job, or any other HTTP request that is spawned not by a user, but by the server itself."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:639
-msgid "Advanced Tip: If you are NOT caching GET requests (recommended), but you DO want to allow some special URLs that include query string parameters to be cached; you can add this special parameter to any URL ?%2$sAC=1
. This tells %1$s that it's OK to cache that particular URL, even though it contains query string arguments. If you ARE caching GET requests and you want to force %1$s to NOT cache a specific request, you can add this special parameter to any URL ?%2$sAC=0
."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:649
-msgid "404 Requests"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:654
-msgid "Caching Enabled for 404 Requests?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:655
-msgid "When this is set to No
, %1$s will ignore all 404 requests and no cache file will be served. While this is fine for most site owners, caching the 404 page on a high-traffic site may further reduce server load. When this is set to Yes
, %1$s will cache the 404 page (see Creating an Error 404 Page) and then serve that single cache file to all future 404 requests."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:657
-msgid "No, do NOT cache (or serve a cache file) for 404 requests."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:658
-msgid "Yes, I would like to cache the 404 page and serve the cached file for 404 requests."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:660
-msgid "How does %1$s cache 404 requests? %1$s will create a special cache file (----404----.html
, see Advanced Tip below) for the first 404 request and then symlink future 404 requests to this special cache file. That way you don't end up with lots of 404 cache files that all contain the same thing (the contents of the 404 page). Instead, you'll have one 404 cache file and then several symlinks (i.e., references) to that 404 cache file."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:661
-msgid "Advanced Tip: The default 404 cache filename (----404----.html
) is designed to minimize the chance of a collision with a cache file for a real page with the same name. However, if you want to override this default and define your own 404 cache filename, you can do so by adding define('COMET_CACHE_404_CACHE_FILENAME', 'your-404-cache-filename');
to your wp-config.php
file (note that the .html
extension should be excluded when defining a new filename)."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:671
-msgid "RSS, RDF, and Atom Feeds"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:676
-msgid "Caching Enabled for RSS, RDF, Atom Feeds?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:677
-msgid "This should almost ALWAYS be set to No
. UNLESS, you're sure that you want to cache your feeds. If you use a web feed management provider like Google® Feedburner and you set this option to Yes
, you may experience delays in the detection of new posts. NOTE: If you do enable this, it is highly recommended that you also enable automatic Feed Clearing too. Please see the section above: \"Automatic Cache Clearing\". Find the sub-section titled: \"Auto-Clear RSS/RDF/ATOM Feeds\"."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:679
-msgid "No, do NOT cache (or serve a cache file) when displaying a feed."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:680
-msgid "Yes, I would like to cache feed URLs."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:682
-msgid "Note: This option affects all feeds served by WordPress, including the site feed, the site comment feed, post-specific comment feeds, author feeds, search feeds, and category and tag feeds. See also: WordPress Feeds."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:692
-msgid "URI Exclusion Patterns"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:696
-msgid "Don't Cache These Special URI Exclusion Patterns?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:697
-msgid "Sometimes there are certain cases where a particular file, or a particular group of files, should never be cached. This is where you will enter those if you need to (one per line). Searches are performed against the REQUEST_URI
; i.e., /path/?query
(caSe insensitive). So, don't put in full URLs here, just word fragments found in the file path (or query string) is all you need, excluding the http:// and domain name. A wildcard *
character can also be used when necessary; e.g., /category/abc-followed-by-*
(where *
= 0 or more characters that are NOT a slash /
). Other special characters include: **
= 0 or more characters of any kind, including /
slashes; ^
= beginning of the string; $
= end of the string. To learn more about this syntax, please see this KB article."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:711
-msgid "HTTP Referrer Exclusion Patterns"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:715
-msgid "Don't Cache These Special HTTP Referrer Exclusion Patterns?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:716
-msgid "Sometimes there are special cases where a particular referring URL (or referring domain) that sends you traffic; or even a particular group of referring URLs or domains that send you traffic; should result in a page being loaded on your site that is NOT from the cache (and that resulting page should never be cached). This is where you will enter those if you need to (one per line). Searches are performed against the HTTP_REFERER
(caSe insensitive). A wildcard *
character can also be used when necessary; e.g., *.domain.com
(where *
= 0 or more characters that are NOT a slash /
). Other special characters include: **
= 0 or more characters of any kind, including /
slashes; ^
= beginning of the string; $
= end of the string. To learn more about this syntax, please see this KB article."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:718
-msgid "Tip: let's use this example URL: http://www.referring-domain.com/search/?q=search+terms
. To exclude this referring URL, you could put this line into the field above: www.referring-domain.com
. Or, you could also just put in a small fragment, like: /search/
or q=*
; and that would exclude any referrer containing that word fragment."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:729
-msgid "User-Agent Exclusion Patterns"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:733
-msgid "Don't Cache These Special User-Agent Exclusion Patterns?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:734
-msgid "Sometimes there are special cases when a particular user-agent (e.g., a specific browser or a specific type of device); should be shown a page on your site that is NOT from the cache (and that resulting page should never be cached). This is where you will enter those if you need to (one per line). Searches are performed against the HTTP_USER_AGENT
(caSe insensitive). A wildcard *
character can also be used when necessary; e.g., Android *; Chrome/* Mobile
(where *
= 0 or more characters that are NOT a slash /
). Other special characters include: **
= 0 or more characters of any kind, including /
slashes; ^
= beginning of the string; $
= end of the string. To learn more about this syntax, please see this KB article."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:736
-msgid "Tip: if you wanted to exclude iPhones put this line into the field above: iPhone;*AppleWebKit
. Or, you could also just put in a small fragment, like: iphone
; and that would exclude any user-agent containing that word fragment. Note, this is just an example. With a default installation of %1$s, there is no compelling reason to exclude iOS devices (or any mobile device for that matter)."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:748
-msgid "Auto-Cache Engine"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:753
-msgid "Enable the Auto-Cache Engine?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:754
-msgid "After using %1$s for awhile (or any other page caching plugin, for that matter); it becomes obvious that at some point (based on your configured Expiration Time) %1$s has to refresh itself. It does this by ditching its cached version of a page, reloading the database-driven content, and then recreating the cache with the latest data. This is a never ending regeneration cycle that is based entirely on your configured Expiration Time."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:755
-msgid "Understanding this, you can see that 99% of your visitors are going to receive a lightning fast response from your server. However, there will always be around 1% of your visitors that land on a page for the very first time (before it's been cached), or land on a page that needs to have its cache regenerated, because the existing cache has become outdated. We refer to this as a First-Come Slow-Load Issue. Not a huge problem, but if you're optimizing your site for every ounce of speed possible, the Auto-Cache Engine can help with this. The Auto-Cache Engine has been designed to combat this issue by taking on the responsibility of being that first visitor to a page that has not yet been cached, or has an expired cache. The Auto-Cache Engine is powered, in part, by WP-Cron (already built into WordPress). The Auto-Cache Engine runs at 15-minute intervals via WP-Cron. It also uses the WP_Http class, which is also built into WordPress already."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:756
-msgid "The Auto-Cache Engine obtains its list of URLs to auto-cache, from two different sources. It can read an XML Sitemap and/or a list of specific URLs that you supply. If you supply both sources, it will use both sources collectively. The Auto-Cache Engine takes ALL of your other configuration options into consideration too, including your Expiration Time, as well as any cache exclusion rules."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:758
-msgid "No, leave the Auto-Cache Engine disabled please."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:759
-msgid "Yes, I want the Auto-Cache Engine to keep pages cached automatically."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:765
-msgid "XML Sitemap URL (or an XML Sitemap Index)"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:769
-msgid "All URLs in this network are in the sitemap for the main site."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:770
-msgid "Using the path I've given, look for blog-specific sitemaps in each child blog also."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:772
-msgid "↑ If enabled here, each child blog can be auto-cached too. %1$s will dynamically change the leading %2$s
as necessary; for each child blog in the network. %1$s supports both sub-directory & sub-domain networks, including domain mapping plugins. For more information about how the Auto-Cache Engine caches child blogs, see this article."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:776
-msgid "And/Or; a List of URLs to Auto-Cache (One Per Line)"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:778
-msgid "Note: Wildcards are NOT supported here. If you are going to supply a list of URLs above, each line must contain one full URL for the Auto-Cache Engine to auto-cache. If you have many URLs, we recommend using an XML Sitemap."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:782
-msgid "Auto-Cache Delay Timer (in Milliseconds)"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:783
-msgid "As the Auto-Cache Engine runs through each URL, you can tell it to wait X number of milliseconds between each connection that it makes. It is strongly suggested that you DO have some small delay here. Otherwise, you run the risk of hammering your own web server with multiple repeated connections whenever the Auto-Cache Engine is running. This is especially true on very large sites; where there is the potential for hundreds of repeated connections as the Auto-Cache Engine goes through a long list of URLs. Adding a delay between each connection will prevent the Auto-Cache Engine from placing a heavy load on the processor that powers your web server. A value of 500
milliseconds is suggested here (half a second). If you experience problems, you can bump this up a little at a time, in increments of 500
milliseconds; until you find a happy place for your server. Please note that 1000
milliseconds = 1
full second."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:788
-msgid "Auto-Cache User-Agent String"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:790
-msgid "This is how the Auto-Cache Engine identifies itself when connecting to URLs. See User Agent in the Wikipedia."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:802
-msgid "HTML Compression"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:807
-msgid "Enable WebSharks™ HTML Compression?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:809
-msgid "No, do NOT compress HTML/CSS/JS code at runtime."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:810
-msgid "Yes, I want to compress HTML/CSS/JS for blazing fast speeds."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:812
-msgid "Note: This is experimental. Please report issues here."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:815
-msgid "HTML Compression Options"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:816
-msgid "You can learn more about all of these options here."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:818
-msgid "Yes, combine CSS from <head> and <body> into fewer files."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:819
-msgid "No, do not combine CSS from <head> and <body> into fewer files."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:822
-msgid "Yes, compress the code in any unified CSS files."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:823
-msgid "No, do not compress the code in any unified CSS files."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:826
-msgid "Yes, combine JS from <head> into fewer files."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:827
-msgid "No, do not combine JS from <head> into fewer files."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:830
-msgid "Yes, combine JS footer scripts into fewer files."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:831
-msgid "No, do not combine JS footer scripts into fewer files."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:834
-msgid "Yes, combine CSS/JS from remote resources too."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:835
-msgid "No, do not combine CSS/JS from remote resources."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:838
-msgid "Yes, compress the code in any unified JS files."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:839
-msgid "No, do not compress the code in any unified JS files."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:842
-msgid "Yes, compress inline JavaScript snippets."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:843
-msgid "No, do not compress inline JavaScript snippets."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:846
-msgid "Yes, compress (remove extra whitespace) in the final HTML code too."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:847
-msgid "No, do not compress the final HTML code."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:850
-msgid "CSS Exclusion Patterns?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:851
-msgid "Sometimes there are special cases when a particular CSS file should NOT be consolidated or compressed in any way. This is where you will enter those if you need to (one per line). Searches are performed against the <link href="">
value, and also against the contents of any inline <style>
tags (caSe insensitive). A wildcard *
character can also be used when necessary; e.g., xy*-framework
(where *
= 0 or more characters that are NOT a slash /
). Other special characters include: **
= 0 or more characters of any kind, including /
slashes; ^
= beginning of the string; $
= end of the string. To learn more about this syntax, please see this KB article."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:854
-msgid "JavaScript Exclusion Patterns?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:855
-msgid "Sometimes there are special cases when a particular JS file should NOT be consolidated or compressed in any way. This is where you will enter those if you need to (one per line). Searches are performed against the <script src="">
value, and also against the contents of any inline <script>
tags (caSe insensitive). A wildcard *
character can also be used when necessary; e.g., xy*-framework
(where *
= 0 or more characters that are NOT a slash /
). Other special characters include: **
= 0 or more characters of any kind, including /
slashes; ^
= beginning of the string; $
= end of the string. To learn more about this syntax, please see this KB article."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:858
-msgid "URI Exclusions for HTML Compressor?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:859
-msgid "When you enable HTML Compression above, you may want to prevent certain pages on your site from being cached by the HTML Compressor. This is where you will enter those if you need to (one per line). Searches are performed against the REQUEST_URI
; i.e., /path/?query
(caSe insensitive). So, don't put in full URLs here, just word fragments found in the file path (or query string) is all you need, excluding the http:// and domain name. A wildcard *
character can also be used when necessary; e.g., /category/abc-followed-by-*
(where *
= 0 or more characters that are NOT a slash /
). Other special characters include: **
= 0 or more characters of any kind, including /
slashes; ^
= beginning of the string; $
= end of the string. To learn more about this syntax, please see this KB article."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:864
-msgid "HTML Compression Cache Expiration"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:866
-msgid "Tip: the value that you specify here MUST be compatible with PHP's strtotime()
function. Examples: 2 hours
, 7 days
, 6 months
, 1 year
."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:867
-msgid "Note: This does NOT impact the overall cache expiration time that you configure with %1$s. It only impacts the sub-routines provided by the HTML Compressor. In fact, this expiration time is mostly irrelevant. The HTML Compressor uses an internal checksum, and it also checks filemtime()
before using an existing cache file. The HTML Compressor class also handles the automatic cleanup of your cache directories to keep it from growing too large over time. Therefore, unless you have VERY little disk space there is no reason to set this to a lower value (even if your site changes dynamically quite often). If anything, you might like to increase this value which could help to further reduce server load. You can learn more here. We recommend setting this value to at least double that of your overall %1$s expiration time."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:869
-msgid "Enable HTML Compression for Logged-In Users?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:870
-msgid "Disabled by default. This setting is only applicable when caching for Logged-In Users is enabled. This should remain disabled for logged-in users because the user-specific cache has a much shorter Time To Live (TTL) which means their cache is likely to expire more quickly than a normal visitor. Rebuilding the HTML Compressor cache is time-consuming and doing it too frequently will actually slow things down for them. For example, if you're logged into the site as a user and you submit a form, that triggers a clearing of the cache for that user, including the HTML Compressor cache (when Logged-In User caching is enabled). Lots of little actions you take can result in a clearing of the cache. This shorter TTL is not ideal when running the HTML Compressor because it does a deep analysis of the page content and the associated resources in order to intelligently compress things. For logged-in users, it is better to skip that extra work and just cache the HTML source as-is, avoiding that extra overhead. In short, do NOT turn this on unless you know what you're doing."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:872
-msgid "No, disable HTML Compression for logged-in users (recommended)."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:873
-msgid "Yes, enable HTML Compression for logged-in users."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:885
-msgid "GZIP Compression"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:890
-msgid "GZIP Compression (Optional; Highly Recommended)"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:891
-msgid "You don't have to use an .htaccess
file to enjoy the performance enhancements provided by this plugin; caching is handled automatically by WordPress/PHP alone. That being said, if you want to take advantage of the additional speed enhancements associated w/ GZIP compression (and we do recommend this), then you WILL need an .htaccess
file to accomplish that part."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:892
-msgid "%1$s fully supports GZIP compression on its output. However, it does not handle GZIP compression directly. We purposely left GZIP compression out of this plugin, because GZIP compression is something that should really be enabled at the Apache level or inside your php.ini
file. GZIP compression can be used for things like JavaScript and CSS files as well, so why bother turning it on for only WordPress-generated pages when you can enable GZIP at the server level and cover all the bases!"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:893
-msgid "If you want to enable GZIP, create an .htaccess
file in your WordPress® installation directory, and put the following few lines in it. Alternatively, if you already have an .htaccess
file, just add these lines to it, and that is all there is to it. GZIP is now enabled in the recommended way! See also: video about GZIP Compression."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:907
-msgid "Static CDN Filters"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:911
-msgid "Clear CDN Cache (Bump CDN Invalidation Counter)"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:911
-msgid "Clear CDN Cache"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:912
-msgid "Enable Static CDN Filters (e.g., MaxCDN/CloudFront)?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:913
-msgid "This feature allows you to serve some and/or ALL static files on your site from a CDN of your choosing. This is made possible through content/URL filters exposed by WordPress and implemented by %1$s. All it requires is that you setup a CDN host name sourced by your WordPress installation domain. You enter that CDN host name below and %1$s will do the rest! Super easy, and it doesn't require any DNS changes either. :-) Please click here for a general set of instructions."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:914
-msgid "What's a CDN? It's a Content Delivery Network (i.e., a network of optimized servers) designed to cache static resources served from your site (e.g., JS/CSS/images and other static files) onto it's own servers, which are located strategically in various geographic areas around the world. Integrating a CDN for static files can dramatically improve the speed and performance of your site, lower the burden on your own server, and reduce latency associated with visitors attempting to access your site from geographic areas of the world that might be very far away from the primary location of your own web servers."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:917
-msgid "It appears that your server is running NGINX and does not support .htaccess
rules. Please update your server configuration manually. Note that updating your NGINX server configuration before enabling Static CDN Filters is recommended to prevent any CORS errors with your CDN. If you've already updated your NGINX configuration, you can safely ignore this message."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:921
-msgid "No, I do NOT want CDN filters applied at runtime."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:922
-msgid "Yes, I want CDN filters applied w/ my configuration below."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:929
-msgid "CDN Host Name (Required)"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:935
-msgid "This field is really all that's necessary to get Static CDN Filters working! However, it does requires a little bit of work on your part. You need to setup and configure a CDN before you can fill in this field. Once you configure a CDN, you'll receive a host name (provided by your CDN), which you'll enter here; e.g., js9dgjsl4llqpp.cloudfront.net
. We recommend MaxCDN, Amazon CloudFront, KeyCDN, and/or CDN77 but this should work with many of the most popular CDNs. Please read this article for a general set of instructions. We also have a MaxCDN tutorial, CloudFront tutorial, KeyCDN tutorial, and a CDN77 tutorial to walk you through the process."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:940
-msgid "Multiple CDN Host Names for Domain Sharding and Multisite Networks (Optional)"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:941
-msgid "%1$s also supports multiple CDN Host Names for any given domain. Using multiple CDN Host Names (instead of just one, as seen above) is referred to as Domain Sharding (click here to learn more). If you configure multiple CDN Host Names (i.e., if you implement Domain Sharding), %1$s will use the first one that you list for static resources loaded in the HTML <head>
section, the last one for static resources loaded in the footer, and it will choose one at random for all other static resource locations. Configuring multiple CDN Host Names can improve speed! This is a way for advanced site owners to work around concurrency limits in popular browsers; i.e., making it possible for browsers to download many more resources simultaneously, resulting in a faster overall completion time. In short, this tells the browser that your website will not be overloaded by concurrent requests, because static resources are in fact being served by a content-delivery network (i.e., multiple CDN host names). If you use this functionality for Domain Sharding, we suggest that you setup one CDN Distribution (aka: Pull Zone), and then create multiple CNAME records pointing to that distribution. You can enter each of your CNAMES in the field below, as instructed."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:942
-msgid "On WordPress Multisite Network installations, this field also allows you to configure different CDN Host Names for each domain (or sub-domain) that you run from a single installation of WordPress. For more information about configuring Static CDN Filters on a WordPress Multisite Network, see this tutorial: Static CDN Filters for WordPress Multisite Networks."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:944
-msgid "↑ Syntax: This is a line-delimited list of domain mappings. Each line should start with your WordPress domain name (e.g., %1$s
), followed by an =
sign, followed by a comma-delimited list of CDN Host Names associated with the domain in that line. If you're running a Multisite Network installation of WordPress, you might have multiple configuration lines. Otherwise, you should only need one line to configure multiple CDN Host Names for a standard WordPress installation."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:948
-msgid "CDN Supports HTTPS Connections?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:950
-msgid "No, I don't serve content over https://; or I haven't configured my CDN w/ an SSL certificate."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:951
-msgid "Yes, I've configured my CDN w/ an SSL certificate; I need https:// enabled."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:958
-msgid "Additional Options (For Advanced Users)"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:963
-msgid "Everything else below is 100% completely optional; i.e., not required to enjoy the benefits of Static CDN Filters."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:967
-msgid "Whitelisted File Extensions (Optional; Comma-Delimited)"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:969
-msgid "If you leave this empty a default set of extensions are taken from WordPress itself. The default set of whitelisted file extensions includes everything supported by the WordPress media library."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:971
-msgid "Blacklisted File Extensions (Optional; Comma-Delimited)"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:973
-msgid "With or without a whitelist, you can force exclusions by explicitly blacklisting certain file extensions of your choosing. Please note, the php
extension will never be considered a static resource; i.e., it is automatically blacklisted at all times."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:977
-msgid "Whitelisted URI Inclusion Patterns (Optional; One Per Line)"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:979
-msgid "Note: please remember that your entries here should be formatted as a line-delimited list; e.g., one inclusion pattern per line."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:980
-msgid "If provided, only local URIs matching one of the patterns you list here will be served from your CDN Host Name. URI patterns are caSe-insensitive. A wildcard *
will match zero or more characters in any of your patterns. A caret ^
symbol will match zero or more characters that are NOT the /
character. For instance, */wp-content/*
here would indicate that you only want to filter URLs that lead to files located inside the wp-content
directory. Adding an additional line with */wp-includes/*
would filter URLs in the wp-includes
directory also. If you leave this empty, ALL files matching a static file extension will be served from your CDN; i.e., the default behavior."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:981
-msgid "Please note that URI patterns are tested against a file's path (i.e., a file's URI, and NOT its full URL). A URI always starts with a leading /
. To clarify, a URI is the portion of the URL which comes after the host name. For instance, given the following URL: http://example.com/path/to/style.css?ver=3
, the URI you are matching against would be: /path/to/style.css?ver=3
. To whitelist this URI, you could use a line that contains something like this: /path/to/*.css*
"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:983
-msgid "Blacklisted URI Exclusion Patterns (Optional; One Per Line)"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:985
-msgid "With or without a whitelist, you can force exclusions by explicitly blacklisting certain URI patterns. URI patterns are caSe-insensitive. A wildcard *
will match zero or more characters in any of your patterns. A caret ^
symbol will match zero or more characters that are NOT the /
character. For instance, */wp-content/*/dynamic.pdf*
would exclude a file with the name dynamic.pdf
located anywhere inside a sub-directory of wp-content
."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:990
-msgid "Query String Invalidation Variable Name"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:992
-msgid "Each filtered URL (which then leads to your CDN) will include this query string variable as an easy way to invalidate the CDN cache at any time. Invalidating the CDN cache is simply a matter of changing the global invalidation counter (i.e., the value assigned to this query string variable). %1$s manages invalidations automatically; i.e., %1$s will automatically bump an internal counter each time you upgrade a WordPress component (e.g., a plugin, theme, or WP itself). Or, if you ask %1$s to invalidate the CDN cache (e.g., a manual clearing of the CDN cache); the internal counter is bumped then too. In short, %1$s handles cache invalidations for you reliably. This option simply allows you to customize the query string variable name which makes cache invalidations possible. Please note, the default value is adequate for most sites. You can change this if you like, but it's not necessary."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:993
-msgid "Tip: You can also tell %1$s to automatically bump the CDN Invalidation Counter whenever you clear the cache manually. See: %1$s → Manual Cache Clearing → Clear the CDN Cache Too?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:994
-msgid "Note: If you empty this field, it will effectively disable the %1$s invalidation system for Static CDN Filters; i.e., the query string variable will NOT be included if you do not supply a variable name."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:1007
-msgid "Dynamic Version Salt"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:1012
-msgid " GEEK ALERT This is for VERY advanced users only..."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:1013
-msgid "Note: Understanding the %1$s Branched Cache Structure is a prerequisite to understanding how Dynamic Version Salts are added to the mix."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:1014
-msgid "A Version Salt gives you the ability to dynamically create multiple variations of the cache, and those dynamic variations will be served on subsequent visits; e.g., if a visitor has a specific cookie (of a certain value) they will see pages which were cached with that version (i.e., w/ that Version Salt: the value of the cookie). A Version Salt can really be anything."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:1015
-msgid "A Version Salt can be a single variable like $_COOKIE['my_cookie']
, or it can be a combination of multiple variables, like $_COOKIE['my_cookie'].$_COOKIE['my_other_cookie']
. (When using multiple variables, please separate them with a dot, as shown in the example.)"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:1016
-msgid "Experts could even use PHP ternary expressions that evaluate into something. For example: ((preg_match('/iPhone/i', $_SERVER['HTTP_USER_AGENT'])) ? 'iPhones' : '')
. This would force a separate version of the cache to be created for iPhones (e.g., /cache/PROTOCOL/HOST/REQUEST-URI.v/iPhones.html
)."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:1017
-msgid "For more documentation, please see Dynamic Version Salts."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:1019
-msgid "Create a Dynamic Version Salt For %1$s? 150%% OPTIONAL"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:1021
-msgid "Super Globals work here; $GLOBALS['table_prefix']
is a popular one./wp-config.php
; such as WPLANG
or DB_HOST
."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:1022
-msgid "Important: your Version Salt is scanned for PHP syntax errors via phpCodeChecker.com
. If errors are found, you'll receive a notice in the Dashboard."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:1023
-msgid "If you've enabled a separate cache for each user (optional) that's perfectly OK. A Version Salt works with user caching too."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:1033
-msgid "Theme/Plugin Developers"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:1038
-msgid "Developing a Theme or Plugin for WordPress?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:1039
-msgid "Tip: %1$s can be disabled temporarily. If you're a theme/plugin developer, you can set a flag within your PHP code to disable the cache engine at runtime. Perhaps on a specific page, or in a specific scenario. In your PHP script, set: $_SERVER['COMET_CACHE_ALLOWED'] = FALSE;
or define('COMET_CACHE_ALLOWED', FALSE)
. %1$s is also compatible with: define('DONOTCACHEPAGE', TRUE)
. It does't matter where or when you define one of these, because %1$s is the last thing to run before script execution ends."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:1041
-msgid "Writing \"Advanced Cache\" Plugins Specifically for %1$s"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:1042
-msgid "Theme/plugin developers can take advantage of the %1$s plugin architecture by creating PHP files inside this special directory: /wp-content/ac-plugins/
. There is an example plugin file @ GitHub (please review it carefully and ask questions). If you develop a plugin for %1$s, please share it with the community by publishing it in the plugins respository at WordPress.org."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:1043
-msgid "Why does %1$s have it's own plugin architecture? WordPress loads the advanced-cache.php
drop-in file (for caching purposes) very early-on; before any other plugins or a theme. For this reason, %1$s implements it's own watered-down version of functions like add_action()
, do_action()
, add_filter()
, apply_filters()
."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:1054
-msgid "Import/Export Options"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:1059
-msgid "Import Options from Another %1$s Installation?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:1060
-msgid "Upload your %1$s-options.json
file and click \"Save All Changes\" below. The options provided by your import file will override any that exist currently."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:1063
-msgid "Export Existing Options from this %1$s Installation?"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:1066
-msgid "%1$s-options.json"
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:1067
-msgid "Download your existing options and import them all into another %1$s installation; saves time on future installs."
-msgstr ""
-
-#: src/includes/classes/MenuPageOptions.php:1075
-msgid "Save All Changes"
-msgstr ""
-
-#: src/includes/classes/VsUpgrades.php:201
-msgid "Woohoo! %1$s activated. :-)"
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:75
-msgid "because `PHP_SAPI` reports that you are currently running from the command line."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:79
-msgid "because `$_SERVER['HTTP_HOST']` is missing from your server configuration."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:83
-msgid "because `$_SERVER['REQUEST_URI']` is missing from your server configuration."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:88
-msgid "because the s2Member plugin set the PHP constant `COMET_CACHE_ALLOWED` to a boolean-ish `FALSE` value at runtime. The s2Member plugin is serving content that must remain dynamic on this particular page, and therefore this page was intentionally not cached for a very good reason."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:90
-msgid "because the PHP constant `COMET_CACHE_ALLOWED` has been set to a boolean-ish `FALSE` value at runtime. Perhaps by WordPress itself, or by one of your themes/plugins. This usually means that you have a theme/plugin intentionally disabling the cache on this page; and it's usually for a very good reason."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:95
-msgid "because the environment variable `$_SERVER['COMET_CACHE_ALLOWED']` has been set to a boolean-ish `FALSE` value at runtime. Perhaps by WordPress itself, or by one of your themes/plugins. This usually means that you have a theme/plugin intentionally disabling the cache on this page; and it's usually for a very good reason."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:99
-msgid "because the PHP constant `DONOTCACHEPAGE` has been set at runtime. Perhaps by WordPress itself, or by one of your themes/plugins. This usually means that you have a theme/plugin intentionally disabling the cache on this page; and it's usually for a very good reason."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:103
-msgid "because the environment variable `$_SERVER['DONOTCACHEPAGE']` has been set at runtime. Perhaps by WordPress itself, or by one of your themes/plugins. This usually means that you have a theme/plugin intentionally disabling the cache on this page; and it's usually for a very good reason."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:107
-msgid "because `$_GET['%1$sAC']` is set to a boolean-ish FALSE value."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:111
-msgid "because `$_SERVER['REQUEST_METHOD']` is `POST`, `PUT`, `DELETE`, `HEAD`, `OPTIONS`, `TRACE` or `CONNECT`. These request methods should never (ever) be cached in any way."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:115
-msgid "because `[current IP address]` === `$_SERVER['SERVER_ADDR']`; i.e. a self-serve request. DEVELOPER TIP: if you are testing on a localhost installation, please add `define('LOCALHOST', TRUE);` to your `/wp-config.php` file while you run tests :-) Remove it (or set it to a `FALSE` value) once you go live on the web."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:119
-msgid "because `$_SERVER['REQUEST_URI']` indicates this is a `/feed`; and the configuration of this site says not to cache XML-based feeds."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:123
-msgid "because `$_SERVER['REQUEST_URI']` indicates this is a `wp-` or `xmlrpc` file; i.e. a WordPress systematic file. WordPress systematics are never (ever) cached in any way."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:127
-msgid "because `$_SERVER['REQUEST_URI']` or the `is_admin()` function indicates this is an administrative area of the site."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:131
-msgid "because `$_SERVER['REQUEST_URI']` indicates this is a Multisite Network; and this was a request for `/files/*`, not a page."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:136
-msgid "because the current user visiting this page (usually YOU), appears to be logged-in. The current configuration says NOT to cache pages for logged-in visitors. This message may also appear if you have an active PHP session on this site, or if you've left (or replied to) a comment recently. If this message continues, please clear your cookies and try again."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:140
-msgid "because the current page contains `_wpnonce` or `akismet_comment_nonce`. While your current configuration states that pages SHOULD be cache for logged-in visitors, `*nonce*` values in the markup are not cache-compatible. See http://wsharks.com/1O1Kudy for further details."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:144
-msgid "because the current page contains `_wpnonce` or `akismet_comment_nonce`. Note that `*nonce*` values in the markup are not cache-compatible. See http://wsharks.com/1O1Kudy for further details."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:148
-msgid "because the current user appeared to be logged into the site (in one way or another); but %1$s was unable to formulate a User Token for them. Please report this as a possible bug."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:152
-msgid "because `$_GET` contains query string data. The current configuration says NOT to cache GET requests with a query string."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:156
-msgid "because `$_REQUEST` indicates this is simply a preview of something to come."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:160
-msgid "because `$_SERVER['REQUEST_URI']` matches a configured URI Exclusion Pattern on this installation."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:164
-msgid "because `$_SERVER['HTTP_USER_AGENT']` matches a configured User-Agent Exclusion Pattern on this installation."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:168
-msgid "because `$_SERVER['HTTP_REFERER']` and/or `$_GET['_wp_http_referer']` matches a configured HTTP Referrer Exclusion Pattern on this installation."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:172
-msgid "because the WordPress `is_404()` Conditional Tag says the current page is a 404 error. The current configuration says NOT to cache 404 errors."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:176
-msgid "because a plugin running on this installation says this page is in Maintenance Mode; i.e. is not available publicly at this time."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:180
-msgid "because %1$s is unable to cache already-compressed output. Please use `mod_deflate` w/ Apache; or use `zlib.output_compression` in your `php.ini` file. %1$s is NOT compatible with `ob_gzhandler()` and others like this."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:184
-msgid "because the contents of this document contain ``, which indicates this is an auto-generated WordPress error message."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:188
-msgid "because a `Content-Type:` header was set via PHP at runtime. The header contains a MIME type which is NOT a variation of HTML or XML. This header might have been set by your hosting company, by WordPress itself; or by one of your themes/plugins."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:192
-msgid "because a `Status:` header (or an `HTTP/` header) was set via PHP at runtime. The header contains a non-`2xx` status code. This indicates the current page was not loaded successfully. This header might have been set by your hosting company, by WordPress itself; or by one of your themes/plugins."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:196
-msgid "because the WordPress `is_404()` Conditional Tag says the current page is a 404 error; and this is the first time it's happened on this page. Your current configuration says that 404 errors SHOULD be cached, so %1$s built a cached symlink which points future requests for this location to your already-cached 404 error document. If you reload this page (assuming you don't clear the cache before you do so); you should get a cached version of your 404 error document. This message occurs ONCE for each new/unique 404 error request."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:200
-msgid "because %1$s detected an early output buffer termination. This may happen when a theme/plugin ends, cleans, or flushes all output buffers before reaching the PHP shutdown phase. It's not always a bad thing. Sometimes it is necessary for a theme/plugin to do this. However, in this scenario it is NOT possible to cache the output; since %1$s is effectively disabled at runtime when this occurs."
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:204
-msgid "due to an unexpected behavior in the application. Please report this as a bug!"
-msgstr ""
-
-#: src/includes/closures/Ac/NcDebugUtils.php:208
-msgid "%1$s is NOT caching this page, %2$s"
-msgstr ""
-
-#. translators: This string is actually NOT translatable because the `__()`
-#. function is not available at this point in the processing.
-#: src/includes/closures/Ac/ObUtils.php:210
-msgid "%1$s fully functional :-) Cache file served for (%2$s) in %3$s seconds, on: %4$s."
-msgstr ""
-
-#: src/includes/closures/Ac/ObUtils.php:238
-msgid "Unexpected OB phase: `%1$s`."
-msgstr ""
-
-#: src/includes/closures/Ac/ObUtils.php:318
-msgid "Cache directory not writable. %1$s needs this directory please: `%2$s`. Set permissions to `755` or higher; `777` might be needed in some cases."
-msgstr ""
-
-#: src/includes/closures/Ac/ObUtils.php:324
-#: src/includes/closures/Ac/ObUtils.php:342
-msgid "Unable to create symlink: `%1$s` » `%2$s`. Possible permissions issue (or race condition), please check your cache directory: `%3$s`."
-msgstr ""
-
-#: src/includes/closures/Ac/ObUtils.php:335
-msgid "%1$s file path: %2$s"
-msgstr ""
-
-#: src/includes/closures/Ac/ObUtils.php:336
-msgid "%1$s file built for (%2$s%3$s) in %4$s seconds, on: %5$s."
-msgstr ""
-
-#: src/includes/closures/Ac/ObUtils.php:336
-msgid "user token: %1$s"
-msgstr ""
-
-#: src/includes/closures/Ac/ObUtils.php:337
-msgid "This %1$s file will auto-expire (and be rebuilt) on: %2$s (based on your configured expiration time)."
-msgstr ""
-
-#: src/includes/closures/Ac/ObUtils.php:352
-msgid "%1$s: failed to write cache file for: `%2$s`; possible permissions issue (or race condition), please check your cache directory: `%3$s`."
-msgstr ""
-
-#: src/includes/closures/Plugin/CronUtils.php:18
-msgid "Every 15 Minutes"
-msgstr ""
-
-#: src/includes/closures/Plugin/DirUtils.php:21
-#: src/includes/closures/Plugin/DirUtils.php:48
-msgid "Missing `base_dir` option value."
-msgstr ""
-
-#: src/includes/closures/Plugin/InstallUtils.php:16
-msgid "%1$s successfully installed! :-) Please enable caching and review options."
-msgstr ""
-
-#: src/includes/closures/Plugin/InstallUtils.php:55
-msgid "%1$s: detected a new version of itself. Recompiling w/ latest version... wiping the cache... all done :-)"
-msgstr ""
-
-#: src/includes/closures/Plugin/MenuPageUtils.php:46
-msgid "%"
-msgstr ""
-
-#: src/includes/closures/Plugin/MenuPageUtils.php:47
-msgid "file"
-msgstr ""
-
-#: src/includes/closures/Plugin/MenuPageUtils.php:48
-msgid "files"
-msgstr ""
-
-#: src/includes/closures/Plugin/MenuPageUtils.php:49
-msgid "Page Cache"
-msgstr ""
-
-#: src/includes/closures/Plugin/MenuPageUtils.php:50
-msgid "HTML Compressor"
-msgstr ""
-
-#: src/includes/closures/Plugin/MenuPageUtils.php:51
-msgid "Current Total"
-msgstr ""
-
-#: src/includes/closures/Plugin/MenuPageUtils.php:52
-msgid "Current Site"
-msgstr ""
-
-#: src/includes/closures/Plugin/MenuPageUtils.php:53
-msgid "%s Day High"
-msgstr ""
-
-#: src/includes/closures/Plugin/MenuPageUtils.php:118
-msgid "Settings"
-msgstr ""
-
-#: src/includes/closures/Plugin/MenuPageUtils.php:121
-msgid "Upgrade"
-msgstr ""
-
-#: src/includes/closures/Plugin/NoticeUtils.php:151
-msgid "dismiss ×"
-msgstr ""
-
-#: src/includes/closures/Plugin/WcpAuthorUtils.php:82
-msgid "%1$s: detected changes. Found %2$s in the cache for Author Page: %3$s
; auto-clearing."
-msgstr ""
-
-#: src/includes/closures/Plugin/WcpFeedUtils.php:113
-msgid "%1$s: detected changes. Found %2$s in the cache, for XML feeds of type: %3$s
; auto-clearing."
-msgstr ""
-
-#: src/includes/closures/Plugin/WcpHomeBlogUtils.php:38
-msgid "%1$s: detected changes. Found %2$s in the cache for the designated \"Home Page\"; auto-clearing."
-msgstr ""
-
-#: src/includes/closures/Plugin/WcpHomeBlogUtils.php:96
-msgid "%1$s: detected changes. Found %2$s in the cache for the designated \"Posts Page\"; auto-clearing."
-msgstr ""
-
-#: src/includes/closures/Plugin/WcpPostTypeUtils.php:51
-msgid "Untitled"
-msgstr ""
-
-#: src/includes/closures/Plugin/WcpPostTypeUtils.php:61
-msgid "%1$s: detected changes. Found %2$s in the cache for Custom Post Type: %3$s
; auto-clearing."
-msgstr ""
-
-#: src/includes/closures/Plugin/WcpPostUtils.php:82
-msgid "Post"
-msgstr ""
-
-#: src/includes/closures/Plugin/WcpPostUtils.php:89
-msgid "%1$s: detected changes. Found %2$s in the cache for %3$s ID: %4$s
; auto-clearing."
-msgstr ""
-
-#: src/includes/closures/Plugin/WcpSitemapUtils.php:44
-msgid "%1$s: detected changes. Found %2$s in the cache for XML sitemaps; auto-clearing."
-msgstr ""
-
-#: src/includes/closures/Plugin/WcpTermUtils.php:130
-msgid "%1$s: detected changes. Found %2$s in the cache for %3$s: %4$s
; auto-clearing."
-msgstr ""
-
-#: src/includes/closures/Plugin/WcpUtils.php:164
-msgid "%1$s: detected significant changes. Found %2$s in the cache; auto-wiping."
-msgstr ""
-
-#: src/includes/closures/Plugin/WcpUtils.php:210
-msgid "%1$s: detected important site changes. Found %2$s in the cache for this site; auto-clearing."
-msgstr ""
-
-#: src/includes/closures/Plugin/WcpUtils.php:244
-msgid "%1$s: detected important site changes. Found %2$s in the cache for this site that were expired; auto-purging."
-msgstr ""
-
-#: src/includes/closures/Plugin/WcpUtils.php:278
-msgid "%1$s: detected important site changes. Found %2$s in the cache that were expired; auto-purging."
-msgstr ""
-
-#: src/includes/closures/Plugin/WcpUtils.php:298
-msgid "%1$s: detected significant changes that would normally trigger cache wiping routines. However, cache wiping routines have been disabled by a site administrator. [?]"
-msgstr ""
-
-#: src/includes/closures/Plugin/WcpUtils.php:318
-msgid "%1$s: detected important site changes that would normally trigger cache clearing routines. However, cache clearing routines have been disabled by a site administrator. [?]"
-msgstr ""
-
-#: src/includes/closures/Plugin/WcpUtils.php:338
-msgid "%1$s: detected important site changes that would normally trigger cache purging routines. However, cache purging routines have been disabled by a site administrator. [?]"
-msgstr ""
-
-#: src/includes/closures/Shared/CacheDirUtils.php:24
-msgid "Unable to determine cache directory location."
-msgstr ""
-
-#: src/includes/closures/Shared/CacheDirUtils.php:121
-#: src/includes/closures/Shared/CacheDirUtils.php:277
-msgid "Invalid argument; isAdvancedCache!"
-msgstr ""
-
-#: src/includes/closures/Shared/CacheDirUtils.php:148
-msgid "Unable to delete files. Rename failure on directory: `%1$s`."
-msgstr ""
-
-#: src/includes/closures/Shared/CacheDirUtils.php:172
-#: src/includes/closures/Shared/CacheDirUtils.php:340
-#: src/includes/closures/Shared/CacheDirUtils.php:480
-msgid "Unable to delete symlink: `%1$s`."
-msgstr ""
-
-#: src/includes/closures/Shared/CacheDirUtils.php:187
-#: src/includes/closures/Shared/CacheDirUtils.php:355
-#: src/includes/closures/Shared/CacheDirUtils.php:490
-msgid "Unable to delete file: `%1$s`."
-msgstr ""
-
-#: src/includes/closures/Shared/CacheDirUtils.php:203
-#: src/includes/closures/Shared/CacheDirUtils.php:371
-#: src/includes/closures/Shared/CacheDirUtils.php:500
-msgid "Unable to delete dir: `%1$s`."
-msgstr ""
-
-#: src/includes/closures/Shared/CacheDirUtils.php:211
-#: src/includes/closures/Shared/CacheDirUtils.php:379
-#: src/includes/closures/Shared/CacheDirUtils.php:508
-#: src/includes/closures/Shared/CacheDirUtils.php:603
-msgid "Unexpected resource type: `%1$s`."
-msgstr ""
-
-#: src/includes/closures/Shared/CacheDirUtils.php:218
-#: src/includes/closures/Shared/CacheDirUtils.php:316
-#: src/includes/closures/Shared/CacheDirUtils.php:386
-msgid "Unable to delete files. Rename failure on tmp directory: `%1$s`."
-msgstr ""
-
-#: src/includes/closures/Shared/CacheDirUtils.php:274
-msgid "Invalid argument; host token empty!"
-msgstr ""
-
-#: src/includes/closures/Shared/CacheDirUtils.php:467
-#: src/includes/closures/Shared/CacheDirUtils.php:515
-msgid "Unable to delete all files/dirs. Rename failure on tmp directory: `%1$s`."
-msgstr ""
-
-#: src/includes/closures/Shared/CacheDirUtils.php:519
-msgid "Unable to delete directory: `%1$s`."
-msgstr ""
-
-#: src/includes/closures/Shared/CacheDirUtils.php:578
-msgid "Unable to erase symlink: `%1$s`."
-msgstr ""
-
-#: src/includes/closures/Shared/CacheDirUtils.php:587
-msgid "Unable to erase file: `%1$s`."
-msgstr ""
-
-#: src/includes/closures/Shared/CacheDirUtils.php:596
-msgid "Unable to erase dir: `%1$s`."
-msgstr ""
-
-#: src/includes/closures/Shared/CacheDirUtils.php:610
-msgid "Unable to erase directory: `%1$s`."
-msgstr ""
-
-#: src/includes/closures/Shared/CacheLockUtils.php:25
-msgid "Unable to find the wp-config.php file."
-msgstr ""
-
-#: src/includes/closures/Shared/CacheLockUtils.php:42
-msgid "No writable tmp directory."
-msgstr ""
-
-#: src/includes/closures/Shared/CacheLockUtils.php:48
-msgid "Unable to obtain an exclusive lock."
-msgstr ""
-
-#: src/includes/closures/Shared/HookUtils.php:40
-msgid "Invalid hook."
-msgstr ""
-
-#: src/includes/closures/Shared/I18nUtils.php:15
-msgid "%1$s file"
-msgid_plural "%1$s files"
-msgstr[0] ""
-msgstr[1] ""
-
-#: src/includes/closures/Shared/I18nUtils.php:29
-msgid "%1$s directory"
-msgid_plural "%1$s directories"
-msgstr[0] ""
-msgstr[1] ""
-
-#: src/includes/closures/Shared/I18nUtils.php:43
-msgid "%1$s file/directory"
-msgid_plural "%1$s files/directories"
-msgstr[0] ""
-msgstr[1] ""
-
-#: src/includes/closures/Shared/SysUtils.php:65
-msgid "%s%%"
-msgstr ""
-
-#. Plugin Name of the plugin/theme
-msgid "Comet Cache"
-msgstr ""
-
-#. Plugin URI of the plugin/theme
-msgid "http://cometcache.com/"
-msgstr ""
-
-#. Description of the plugin/theme
-msgid "Comet Cache is an advanced WordPress caching plugin inspired by simplicity."
-msgstr ""
-
-#. Author of the plugin/theme
-msgid "WebSharks, Inc."
-msgstr ""
-
-#. Author URI of the plugin/theme
-msgid "http://websharks-inc.com/"
-msgstr ""
diff --git a/src/includes/uninstall.php b/src/includes/uninstall.php
index 63c118d..0ad4941 100644
--- a/src/includes/uninstall.php
+++ b/src/includes/uninstall.php
@@ -6,14 +6,16 @@
*/
namespace WebSharks\CometCache;
+use WebSharks\CometCache\Classes;
+
if (!defined('WPINC')) {
exit('Do NOT access this file directly: '.basename(__FILE__));
}
-require_once dirname(__FILE__).'/stub.php';
+require_once __DIR__.'/stub.php';
$GLOBALS[GLOBAL_NS.'_uninstalling'] = true; // Needs to be set before calling Conflicts class
-if (!Conflicts::check()) {
- $GLOBALS[GLOBAL_NS] = new Plugin(false);
+if (!Classes\Conflicts::check()) {
+ $GLOBALS[GLOBAL_NS] = new Classes\Plugin(false);
$GLOBALS[GLOBAL_NS]->uninstall();
}
diff --git a/src/vendor/autoload.php b/src/vendor/autoload.php
index b8fd0b8..da2a0d1 100644
--- a/src/vendor/autoload.php
+++ b/src/vendor/autoload.php
@@ -4,4 +4,4 @@
require_once __DIR__ . '/composer' . '/autoload_real.php';
-return ComposerAutoloaderInit33853609dfb2ae52d36861a4ab25a03b::getLoader();
+return ComposerAutoloaderInitaf99bf4520f39031a7a2f2d15b8d1ed0::getLoader();
diff --git a/src/vendor/composer/ClassLoader.php b/src/vendor/composer/ClassLoader.php
index 5e1469e..ff6ecfb 100644
--- a/src/vendor/composer/ClassLoader.php
+++ b/src/vendor/composer/ClassLoader.php
@@ -13,9 +13,7 @@
namespace Composer\Autoload;
/**
- * ClassLoader implements a PSR-0 class loader
- *
- * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
+ * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
*
* $loader = new \Composer\Autoload\ClassLoader();
*
@@ -39,6 +37,8 @@
*
* @author Fabien Potencier wp-config.php
file through a web interface, but this doesn\'t work for all server setups. The safest way is to manually create the file.Create a Configuration File' /*/WP_I18N_CONFIG*/, $path.'setup-config.php'), /*WP_I18N_ERROR*/ 'Translation: WordPress › Error' /*/WP_I18N_ERROR*/);
+}
+
+$wp_did_header = true;
+
+require_once( dirname(__FILE__) . '/wp-config.php');
+
+wp();
+
+require_once(ABSPATH . WPINC . '/template-loader.php');
+
+endif;
+
+?>
diff --git a/src/vendor/websharks/wp-i18n-tools/t/data/not-gettexted-0-work.php b/src/vendor/websharks/wp-i18n-tools/t/data/not-gettexted-0-work.php
new file mode 100644
index 0000000..c233bfc
--- /dev/null
+++ b/src/vendor/websharks/wp-i18n-tools/t/data/not-gettexted-0-work.php
@@ -0,0 +1,24 @@
+wp-config.php file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php
file through a web interface, but this doesn\'t work for all server setups. The safest way is to manually create the file.
Create a Configuration File' /*/WP_I18N_CONFIG*/, $path.'setup-config.php'), /*WP_I18N_ERROR*/ 'Translation: WordPress › Error' /*/WP_I18N_ERROR*/);
+}
+
+$wp_did_header = true;
+
+require_once( dirname(__FILE__) . '/wp-config.php');
+
+wp();
+
+require_once(ABSPATH . WPINC . '/template-loader.php');
+
+endif;
+
+?>
diff --git a/src/vendor/websharks/wp-i18n-tools/t/data/not-gettexted-0.mo b/src/vendor/websharks/wp-i18n-tools/t/data/not-gettexted-0.mo
new file mode 100644
index 0000000..4042fb0
Binary files /dev/null and b/src/vendor/websharks/wp-i18n-tools/t/data/not-gettexted-0.mo differ
diff --git a/src/vendor/websharks/wp-i18n-tools/t/data/not-gettexted-0.php b/src/vendor/websharks/wp-i18n-tools/t/data/not-gettexted-0.php
new file mode 100644
index 0000000..4faaccd
--- /dev/null
+++ b/src/vendor/websharks/wp-i18n-tools/t/data/not-gettexted-0.php
@@ -0,0 +1,24 @@
+wp-config.php file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php
file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.
Create a Configuration File" /*/WP_I18N_CONFIG*/, $path.'setup-config.php'), /*WP_I18N_ERROR*/ "WordPress › Error" /*/WP_I18N_ERROR*/);
+}
+
+$wp_did_header = true;
+
+require_once( dirname(__FILE__) . '/wp-config.php');
+
+wp();
+
+require_once(ABSPATH . WPINC . '/template-loader.php');
+
+endif;
+
+?>
diff --git a/src/vendor/websharks/wp-i18n-tools/t/data/not-gettexted-0.po b/src/vendor/websharks/wp-i18n-tools/t/data/not-gettexted-0.po
new file mode 100644
index 0000000..606ac7e
--- /dev/null
+++ b/src/vendor/websharks/wp-i18n-tools/t/data/not-gettexted-0.po
@@ -0,0 +1,21 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"POT-Creation-Date: \n"
+"PO-Revision-Date: 2008-04-22 19:23+0200\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Not gettexted string WP_I18N_CONFIG
+#: not-gettext-0.php:11
+msgid " There doesn't seem to be a wp-config.php
file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php
file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.
Create a Configuration File"
+msgstr "Translation: There doesn't seem to be a wp-config.php
file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php
file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.
Create a Configuration File" + +#. Not gettexted string WP_I18N_ERROR +#: not-gettext-0.php:11 +msgid "WordPress › Error" +msgstr "Translation: WordPress › Error" + diff --git a/src/vendor/websharks/wp-i18n-tools/t/run.sh b/src/vendor/websharks/wp-i18n-tools/t/run.sh new file mode 100644 index 0000000..bf1ac0d --- /dev/null +++ b/src/vendor/websharks/wp-i18n-tools/t/run.sh @@ -0,0 +1,2 @@ +#!/bin/sh +phpunit Test_Not_Gettexted test_not-gettexted.php diff --git a/src/vendor/websharks/wp-i18n-tools/t/test_not-gettexted.php b/src/vendor/websharks/wp-i18n-tools/t/test_not-gettexted.php new file mode 100644 index 0000000..511b040 --- /dev/null +++ b/src/vendor/websharks/wp-i18n-tools/t/test_not-gettexted.php @@ -0,0 +1,48 @@ +ng = new NotGettexted; + } + + function test_make_string_aggregator() { + global $baba; + $f = $this->ng->make_string_aggregator( 'baba', 'baba.php' ); + call_user_func( $f, 'x', 'y', 'z' ); + call_user_func( $f, 'a', 'b', 'c' ); + $this->assertEquals( array( array( 'x', 'y', 'baba.php', 'z'), array( 'a', 'b', 'baba.php', 'c' ) ), $baba ); + } + + function test_walk() { + $code = ' +'; + $tokens = token_get_all($code); + $this->assertEquals( '', $this->ng->walk_tokens( $tokens, array(&$this->ng, 'ignore_token'), array(&$this->ng, 'ignore_token') ) ); + $this->assertEquals( '"yes"\'We died %d times!\'', $this->ng->walk_tokens( $tokens, array(&$this->ng, 'unchanged_token'), array(&$this->ng, 'ignore_token') ) ); + $this->assertEquals( $code, $this->ng->walk_tokens( $tokens, array(&$this->ng, 'unchanged_token'), array(&$this->ng, 'unchanged_token') ) ); + $this->assertEquals( $code, $this->ng->walk_tokens( $tokens, array(&$this->ng, 'unchanged_token'), array(&$this->ng, 'unchanged_token') ) ); + } + + function test_replace() { + # copy to a new file, so that we don't corrupt the old one + copy( 'data/not-gettexted-0.php', 'data/not-gettexted-0-work.php' ); + $this->ng->command_replace( 'data/not-gettexted-0.mo', 'data/not-gettexted-0-work.php' ); + $this->assertEquals( file_get_contents( 'data/not-gettexted-0-result.php' ), file_get_contents( 'data/not-gettexted-0-work.php' ) ); + unlink( 'data/not-gettexted-0-work.php' ); + } +} \ No newline at end of file diff --git a/uninstall.php b/uninstall.php index 703bf49..1e4ab23 100644 --- a/uninstall.php +++ b/uninstall.php @@ -3,6 +3,6 @@ exit('Do NOT access this file directly: '.basename(__FILE__)); } $GLOBALS['wp_php_rv'] = '5.4'; //php-required-version// -if (require(dirname(__FILE__).'/src/vendor/websharks/wp-php-rv/src/includes/check.php')) { - require_once dirname(__FILE__).'/src/includes/uninstall.php'; +if (require(__DIR__.'/src/vendor/websharks/wp-php-rv/src/includes/check.php')) { + require_once __DIR__.'/src/includes/uninstall.php'; }