diff --git a/.gitmodules b/.gitmodules index 16018b0..98fb769 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ -[submodule "zencache/submodules/wp-php-rv"] - path = zencache/submodules/wp-php-rv - url = https://github.com/websharks/wp-php-rv [submodule "zencache/submodules/sharkicons"] path = zencache/submodules/sharkicons url = https://github.com/websharks/sharkicons +[submodule "zencache/submodules/wp-php-rv"] + path = zencache/submodules/wp-php-rv + url = https://github.com/websharks/wp-php-rv diff --git a/zencache/includes/menu-pages.php b/zencache/includes/menu-pages.php index a6ce126..53dc914 100644 --- a/zencache/includes/menu-pages.php +++ b/zencache/includes/menu-pages.php @@ -645,7 +645,7 @@ public function options() echo '
'."\n"; echo '

'.__('Whitelisted File Extensions (Optional; Comma-Delimited)', $this->plugin->text_domain).'

'."\n"; echo '

'."\n"; - echo '

'.__('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. This includes the following: '.esc_html(str_replace('|', ',', implode('|', array_keys(wp_get_mime_types())))).'.', $this->plugin->text_domain).'

'."\n"; + echo '

'.__('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.', $this->plugin->text_domain).'

'."\n"; echo '

'.__('Blacklisted File Extensions (Optional; Comma-Delimited)', $this->plugin->text_domain).'

'."\n"; echo '

'."\n"; echo '

'.__('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.', $this->plugin->text_domain).'

'."\n"; diff --git a/zencache/includes/share.php b/zencache/includes/share.php index 849b264..8ab2411 100644 --- a/zencache/includes/share.php +++ b/zencache/includes/share.php @@ -61,7 +61,7 @@ abstract class share // Shared between {@link advanced_cache} and {@link plugin} * * @var string Current version of the software. */ - public $version = '150218'; + public $version = '150314'; /** * Plugin slug; based on `__NAMESPACE__`. @@ -2226,11 +2226,11 @@ public function do_wp_action($hook) if(stripos($hook, __NAMESPACE__) === 0) // Do Quick Cache back compat? { - $quick_cache_filter = 'quick_cache'.substr($hook, strlen(__NAMESPACE__)); + $quick_cache_filter = 'quick_cache'.substr($hook, strlen(__NAMESPACE__)); + $quick_cache_args = $args; // Use a copy of the args. + $quick_cache_args[0] = $quick_cache_filter; - array_shift($args); // Shift `$hook` off. - array_unshift($args, $quick_cache_filter); // For Quick Cache. - call_user_func_array('do_action', $args); + call_user_func_array('do_action', $quick_cache_args); } } @@ -2251,11 +2251,12 @@ public function apply_wp_filters($hook) if(stripos($hook, __NAMESPACE__) === 0) // Do Quick Cache back compat? { - $quick_cache_hook = 'quick_cache'.substr($hook, strlen(__NAMESPACE__)); + $quick_cache_hook = 'quick_cache'.substr($hook, strlen(__NAMESPACE__)); + $quick_cache_args = $args; // Use a copy of the args. + $quick_cache_args[0] = $quick_cache_hook; + $quick_cache_args[1] = $value; - array_shift($args); // Shift `$hook` off. - array_unshift($args, $quick_cache_hook); // For Quick Cache. - $value = call_user_func_array('apply_filters', $args); + $value = call_user_func_array('apply_filters', $quick_cache_args); } return $value; // Filtered value. } diff --git a/zencache/includes/translations/zencache.pot b/zencache/includes/translations/zencache.pot index 551d4aa..5926a58 100644 --- a/zencache/includes/translations/zencache.pot +++ b/zencache/includes/translations/zencache.pot @@ -2,9 +2,9 @@ # This file is distributed under the same license as the ZenCache package. msgid "" msgstr "" -"Project-Id-Version: ZenCache 150218\n" +"Project-Id-Version: ZenCache 150314\n" "Report-Msgid-Bugs-To: http://wordpress.org/tag/zencache\n" -"POT-Creation-Date: 2015-02-18 04:42:57+00:00\n" +"POT-Creation-Date: 2015-03-15 00:20:02+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -1008,6 +1008,10 @@ msgstr "" msgid "Whitelisted File Extensions (Optional; Comma-Delimited)" msgstr "" +#: includes/menu-pages.php:648 +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 "" + #: includes/menu-pages.php:649 msgid "Blacklisted File Extensions (Optional; Comma-Delimited)" msgstr "" @@ -1246,45 +1250,6 @@ msgstr "" msgid "Woohoo! %1$s activated. :-)" msgstr "" -#: submodules/wp-php-rv/wp-php-rv.php:124 -msgid "extension" -msgid_plural "extensions" -msgstr[0] "" -msgstr[1] "" - -#: submodules/wp-php-rv/wp-php-rv.php:132 -msgid "%1$s is NOT active. It requires PHP v%2$s+." -msgstr "" - -#: submodules/wp-php-rv/wp-php-rv.php:133 -msgid "↳ You're currently running an older copy of PHP v%1$s." -msgstr "" - -#: submodules/wp-php-rv/wp-php-rv.php:136 -msgid "↳ You are also missing the following required PHP %1$s: %2$s." -msgstr "" - -#: submodules/wp-php-rv/wp-php-rv.php:138 -#: submodules/wp-php-rv/wp-php-rv.php:146 -msgid "A simple update is necessary. Please ask your hosting company to help resolve this quickly." -msgstr "" - -#: submodules/wp-php-rv/wp-php-rv.php:139 -msgid "To remove this message, please upgrade PHP. Or, remove %1$s from WordPress." -msgstr "" - -#: submodules/wp-php-rv/wp-php-rv.php:144 -msgid "%1$s is NOT active. PHP %2$s missing." -msgstr "" - -#: submodules/wp-php-rv/wp-php-rv.php:145 -msgid "↳ You are missing the following required PHP %1$s: %2$s." -msgstr "" - -#: submodules/wp-php-rv/wp-php-rv.php:147 -msgid "To remove this message, please install the required PHP %1$s. Or, remove %2$s from WordPress." -msgstr "" - #: zencache.inc.php:369 msgid "%1$s: detected a new version of itself. Recompiling w/ latest version... wiping the cache... all done :-)" msgstr "" @@ -1301,75 +1266,75 @@ msgstr "" msgid "Upgrade" msgstr "" -#: zencache.inc.php:613 zencache.inc.php:684 +#: zencache.inc.php:613 zencache.inc.php:690 msgid "dismiss ×" msgstr "" -#: zencache.inc.php:742 +#: zencache.inc.php:748 msgid "Every 15 Minutes" msgstr "" -#: zencache.inc.php:869 +#: zencache.inc.php:875 msgid "%1$s: detected significant changes. Found %2$s in the cache; auto-wiping." msgstr "" -#: zencache.inc.php:913 +#: zencache.inc.php:919 msgid "%1$s: detected important site changes. Found %2$s in the cache for this site; auto-clearing." msgstr "" -#: zencache.inc.php:992 +#: zencache.inc.php:998 msgid "Post" msgstr "" -#: zencache.inc.php:1000 +#: zencache.inc.php:1006 msgid "%1$s: detected changes. Found %2$s in the cache for %3$s ID: %4$s; auto-clearing." msgstr "" -#: zencache.inc.php:1163 +#: zencache.inc.php:1169 msgid "%1$s: detected changes. Found %2$s in the cache, for XML feeds of type: %3$s; auto-clearing." msgstr "" -#: zencache.inc.php:1206 +#: zencache.inc.php:1212 msgid "%1$s: detected changes. Found %2$s in the cache for XML sitemaps; auto-clearing." msgstr "" -#: zencache.inc.php:1249 +#: zencache.inc.php:1255 msgid "%1$s: detected changes. Found %2$s in the cache for the designated \"Home Page\"; auto-clearing." msgstr "" -#: zencache.inc.php:1307 +#: zencache.inc.php:1313 msgid "%1$s: detected changes. Found %2$s in the cache for the designated \"Posts Page\"; auto-clearing." msgstr "" -#: zencache.inc.php:1362 +#: zencache.inc.php:1368 msgid "Untitled" msgstr "" -#: zencache.inc.php:1373 +#: zencache.inc.php:1379 msgid "%1$s: detected changes. Found %2$s in the cache for Custom Post Type: %3$s; auto-clearing." msgstr "" -#: zencache.inc.php:1463 +#: zencache.inc.php:1469 msgid "%1$s: detected changes. Found %2$s in the cache for Author Page: %3$s; auto-clearing." msgstr "" -#: zencache.inc.php:1615 +#: zencache.inc.php:1621 msgid "%1$s: detected changes. Found %2$s in the cache for %3$s: %4$s; auto-clearing." msgstr "" -#: zencache.inc.php:1904 zencache.inc.php:1932 +#: zencache.inc.php:1910 zencache.inc.php:1938 msgid "Doing it wrong! Missing `base_dir` option value. MUST call this method after `setup()`." msgstr "" -#: zencache.inc.php:2361 +#: zencache.inc.php:2371 msgid "Lite" msgstr "" -#: zencache.inc.php:2362 +#: zencache.inc.php:2372 msgid "Pro" msgstr "" -#: zencache.inc.php:2368 +#: zencache.inc.php:2378 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 "" diff --git a/zencache/readme.txt b/zencache/readme.txt index c6af011..057a784 100644 --- a/zencache/readme.txt +++ b/zencache/readme.txt @@ -1,8 +1,8 @@ === ZenCache === -Stable tag: 150218 +Stable tag: 150314 Requires at least: 3.7 -Tested up to: 4.0 +Tested up to: 4.1.1 Text Domain: zencache License: GPLv2 or later @@ -328,6 +328,14 @@ Requires PHP v5.3+. The latest version of ZenCache is a complete rewrite (OOP de == Changelog == += v150314 = + +- **Bug Fix**: Fixed a bug in the Quick Cache back compat. method `\zencache\share\apply_wp_filters()`. It was not passing the ZenCache-filtered value through the Quick Cache back compat. routine. This bug affected sites that had disabled automatic cache clearing routines via a filter. +- **Bug Fix** (Pro): Updated Static CDN Filters whitelist to include font file extensions `eot,ttf,otf,woff`, as site owners may wish to serve fonts with these extensions from the CDN (this would require a custom CORS configuration; see [this article](http://davidwalsh.name/cdn-fonts) for instructions). See [#427](https://github.com/websharks/zencache/issues/427). +- **Bug Fix** (Pro): Updated Static CDN Filters blacklist to exclude font file extensions `eot,ttf,otf,woff` by default, as they require custom CORS configuration to display properly. See [#427](https://github.com/websharks/zencache/issues/427). +- **Bug Fix** (Pro): The Static CDN Filters feature was calling a protected method that was requiring PHP v5.4+ but now the Static CDN Filters feature works with PHP v5.3+. See [#426](https://github.com/websharks/zencache/issues/426). +- **Bug Fix**: Fixed a zero-byte `advanced-cache.php` bug related to migrating from Quick Cache. When you deleted/uninstalled Quick Cache after upgrading to ZenCache, the Quick Cache uninstallation process would empty the `advanced-cache.php` file, resulting in the site no longer being cached, despite ZenCache being active. ZenCache now continuously checks to make sure that `advanced-cache.php` is installed properly. See [#432](https://github.com/websharks/zencache/issues/432). + = v150218 = **Announcing ZenCache, formerly Quick Cache!** diff --git a/zencache/submodules/sharkicons b/zencache/submodules/sharkicons new file mode 160000 index 0000000..2754bb8 --- /dev/null +++ b/zencache/submodules/sharkicons @@ -0,0 +1 @@ +Subproject commit 2754bb8b929390658fdf25d6d04b8e2b65cead89 diff --git a/zencache/submodules/wp-php-rv b/zencache/submodules/wp-php-rv new file mode 160000 index 0000000..d2ba136 --- /dev/null +++ b/zencache/submodules/wp-php-rv @@ -0,0 +1 @@ +Subproject commit d2ba1363b38b149a9020809c74828e4cfc1a2e73 diff --git a/zencache/zencache.inc.php b/zencache/zencache.inc.php index 2e2edbe..734764e 100644 --- a/zencache/zencache.inc.php +++ b/zencache/zencache.inc.php @@ -612,7 +612,13 @@ public function all_admin_notices() $_dismiss = add_query_arg(urlencode_deep(array(__NAMESPACE__ => array('dismiss_notice' => array('key' => $_key)), '_wpnonce' => wp_create_nonce()))); $_dismiss = ''.__('dismiss ×', $this->text_domain).''; } - echo $this->apply_wp_filters(__METHOD__.'__notice', '

'.$_notice.$_dismiss.'

', get_defined_vars()); + if(strpos($_key, 'class-update-nag') !== FALSE) + $_class = 'update-nag'; + else if(strpos($_key, 'class-error') !== FALSE) + $_class = 'error'; + else + $_class = 'updated'; + echo $this->apply_wp_filters(__METHOD__.'__notice', '

'.$_notice.$_dismiss.'

', get_defined_vars()); } unset($_key, $_notice, $_dismiss_css, $_dismiss); // Housekeeping. } @@ -2046,9 +2052,13 @@ public function check_advanced_cache() return; // Skip on plugin actions. $cache_dir = $this->cache_dir(); // Current cache directory. + $advanced_cache_file = WP_CONTENT_DIR.'/advanced-cache.php'; - if(!is_file($cache_dir.'/zc-advanced-cache')) - $this->add_advanced_cache(); + // Fixes zero-byte advanced-cache.php bug related to migrating from Quick Cache + // See https://github.com/websharks/zencache/issues/432 + if(!is_file($cache_dir.'/zc-advanced-cache') + || !is_file($advanced_cache_file) || filesize($advanced_cache_file) === 0 + ) $this->add_advanced_cache(); } /** diff --git a/zencache/zencache.php b/zencache/zencache.php index d79555d..b680ff3 100644 --- a/zencache/zencache.php +++ b/zencache/zencache.php @@ -1,17 +1,15 @@