Skip to content

Commit

Permalink
Merge branch 'release/150314'
Browse files Browse the repository at this point in the history
  • Loading branch information
raamdev committed Mar 15, 2015
2 parents f3ca172 + 461dc33 commit 72d3666
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 84 deletions.
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion zencache/includes/menu-pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ public function options()
echo ' <hr />'."\n";
echo ' <h3>'.__('Whitelisted File Extensions (Optional; Comma-Delimited)', $this->plugin->text_domain).'</h3>'."\n";
echo ' <p><input type="text" name="'.esc_attr(__NAMESPACE__).'[save_options][cdn_whitelisted_extensions]" value="" /></p>'."\n";
echo ' <p>'.__('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: <code style="white-space:normal; word-wrap:break-word;">'.esc_html(str_replace('|', ',', implode('|', array_keys(wp_get_mime_types())))).'</code>.', $this->plugin->text_domain).'</p>'."\n";
echo ' <p>'.__('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).'</p>'."\n";
echo ' <h3>'.__('Blacklisted File Extensions (Optional; Comma-Delimited)', $this->plugin->text_domain).'</h3>'."\n";
echo ' <p><input type="text" name="'.esc_attr(__NAMESPACE__).'[save_options][cdn_blacklisted_extensions]" value="" /></p>'."\n";
echo ' <p>'.__('With or without a whitelist, you can force exclusions by explicitly blacklisting certain file extensions of your choosing. Please note, the <code>php</code> extension will never be considered a static resource; i.e. it is automatically blacklisted at all times.', $this->plugin->text_domain).'</p>'."\n";
Expand Down
19 changes: 10 additions & 9 deletions zencache/includes/share.php
Original file line number Diff line number Diff line change
Expand Up @@ -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__`.
Expand Down Expand Up @@ -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);
}
}

Expand All @@ -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.
}
Expand Down
83 changes: 24 additions & 59 deletions zencache/includes/translations/zencache.pot
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 ""
Expand Down Expand Up @@ -1246,45 +1250,6 @@ msgstr ""
msgid "<strong>Woohoo! %1$s activated.</strong> :-)"
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 "<strong>%1$s is NOT active. It requires PHP v%2$s+.</strong>"
msgstr ""

#: submodules/wp-php-rv/wp-php-rv.php:133
msgid "&#8627; You're currently running an older copy of PHP v%1$s."
msgstr ""

#: submodules/wp-php-rv/wp-php-rv.php:136
msgid "&#8627; 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 "<em>A simple update is necessary. Please ask your hosting company to help resolve this quickly.</em>"
msgstr ""

#: submodules/wp-php-rv/wp-php-rv.php:139
msgid "<em>To remove this message, please upgrade PHP. Or, remove %1$s from WordPress.</em>"
msgstr ""

#: submodules/wp-php-rv/wp-php-rv.php:144
msgid "<strong>%1$s is NOT active. PHP %2$s missing.</strong>"
msgstr ""

#: submodules/wp-php-rv/wp-php-rv.php:145
msgid "&#8627; You are missing the following required PHP %1$s: %2$s."
msgstr ""

#: submodules/wp-php-rv/wp-php-rv.php:147
msgid "<em>To remove this message, please install the required PHP %1$s. Or, remove %2$s from WordPress.</em>"
msgstr ""

#: zencache.inc.php:369
msgid "<strong>%1$s:</strong> detected a new version of itself. Recompiling w/ latest version... wiping the cache... all done :-)"
msgstr ""
Expand All @@ -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 &times;"
msgstr ""

#: zencache.inc.php:742
#: zencache.inc.php:748
msgid "Every 15 Minutes"
msgstr ""

#: zencache.inc.php:869
#: zencache.inc.php:875
msgid "<strong>%1$s:</strong> detected significant changes. Found %2$s in the cache; auto-wiping."
msgstr ""

#: zencache.inc.php:913
#: zencache.inc.php:919
msgid "<strong>%1$s:</strong> 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 "<strong>%1$s:</strong> detected changes. Found %2$s in the cache for %3$s ID: <code>%4$s</code>; auto-clearing."
msgstr ""

#: zencache.inc.php:1163
#: zencache.inc.php:1169
msgid "<strong>%1$s:</strong> detected changes. Found %2$s in the cache, for XML feeds of type: <code>%3$s</code>; auto-clearing."
msgstr ""

#: zencache.inc.php:1206
#: zencache.inc.php:1212
msgid "<strong>%1$s:</strong> detected changes. Found %2$s in the cache for XML sitemaps; auto-clearing."
msgstr ""

#: zencache.inc.php:1249
#: zencache.inc.php:1255
msgid "<strong>%1$s:</strong> 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 "<strong>%1$s:</strong> 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 "<strong>%1$s:</strong> detected changes. Found %2$s in the cache for Custom Post Type: <code>%3$s</code>; auto-clearing."
msgstr ""

#: zencache.inc.php:1463
#: zencache.inc.php:1469
msgid "<strong>%1$s:</strong> detected changes. Found %2$s in the cache for Author Page: <code>%3$s</code>; auto-clearing."
msgstr ""

#: zencache.inc.php:1615
#: zencache.inc.php:1621
msgid "<strong>%1$s:</strong> detected changes. Found %2$s in the cache for %3$s: <code>%4$s</code>; 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 "<strong>%1$s</strong> is NOT running. A conflicting plugin, <strong>%2$s</strong>, is currently active. Please deactivate the %2$s plugin to clear this message."
msgstr ""

Expand Down
12 changes: 10 additions & 2 deletions zencache/readme.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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!**
Expand Down
1 change: 1 addition & 0 deletions zencache/submodules/sharkicons
Submodule sharkicons added at 2754bb
1 change: 1 addition & 0 deletions zencache/submodules/wp-php-rv
Submodule wp-php-rv added at d2ba13
16 changes: 13 additions & 3 deletions zencache/zencache.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '<a style="'.esc_attr($_dismiss_css).'" href="'.esc_attr($_dismiss).'">'.__('dismiss &times;', $this->text_domain).'</a>';
}
echo $this->apply_wp_filters(__METHOD__.'__notice', '<div class="updated"><p>'.$_notice.$_dismiss.'</p></div>', 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', '<div class="'.$_class.'"><p>'.$_notice.$_dismiss.'</p></div>', get_defined_vars());
}
unset($_key, $_notice, $_dismiss_css, $_dismiss); // Housekeeping.
}
Expand Down Expand Up @@ -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();
}

/**
Expand Down
12 changes: 5 additions & 7 deletions zencache/zencache.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
<?php
/*
Version: 150218
Version: 150314
Text Domain: zencache
Plugin Name: ZenCache
Network: true
Author: s2Member® / WebSharks, Inc.
Author URI: http://www.s2member.com
Author: WebSharks, Inc.
Author URI: http://www.websharks-inc.com/
Plugin URI: http://www.websharks-inc.com/product/zencache/
Description: WordPress advanced cache plugin; speed without compromise!
Speed up your site (BIG time!) — ZenCache provides reliable page caching for WordPress. Easy-to-use (very simple installation).
Plugin URI: http://zencache.com/
Description: ZenCache is an advanced WordPress caching plugin inspired by simplicity. Speed up your site (BIG time!) with a reliable and fast WordPress cache.
*/
if(!defined('WPINC')) // MUST have WordPress.
exit('Do NOT access this file directly: '.basename(__FILE__));
Expand Down

0 comments on commit 72d3666

Please sign in to comment.