Skip to content

Commit

Permalink
Merge branch '000000-dev' into feature/703
Browse files Browse the repository at this point in the history
  • Loading branch information
raamdev committed Jun 3, 2016
2 parents b88b656 + 2d325f5 commit 2d2a5e5
Show file tree
Hide file tree
Showing 19 changed files with 637 additions and 601 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
= v160521 =

- **Bug Fix**: Fixed a bug that, in some scenarios, resulted in "PHP Fatal error: Undefined class constant 'CACHE_PATH_NO_PATH_INDEX'". This also affected the Cache Statistics feature (Comet Cache Pro), resulting in a blank panel when hovering over the Cache Stats button in the menu bar. See [Issue #752](https://github.com/websharks/comet-cache/issues/752).
- **Bug Fix**: When the PHP OPCache extension is active, the OPCache is now cleared when a WordPress plugin is upgraded, activated, or deactivated. This works around an issue that could produce a fatal error when the PHP OPCache contains cached PHP code that conflicts with new PHP code introduced by an update. See [Issue #740](https://github.com/websharks/comet-cache/issues/740).
- **Enhancement** (Pro): It's now possible to disable the WordPress Admin Toolbar when Logged-In User Caching is enabled with a new option in _Comet Cache → Plugin Options → Logged-In Users → Disable the Admin Toolbar for Logged-In Users & Comment Authors?_ Props @renzms and @KTS915. See [Issue #690](https://github.com/websharks/comet-cache/issues/690).
- **Enhancement**: The the option to automatically clear the cache for Custom Term Archive Views (see _Comet Cache → Plugin Options → Automatic Cache Clearing → Auto-Clear "Custom Term Archives" Too?_) is now enabled by default. This feature was previously disabled by default, which lead to confusion about why those cache files were not being cleared automatically when a Custom Post Type with a Custom Term Archive View was being used. Props @renzms. See [Issue #693](https://github.com/websharks/comet-cache/issues/693).
- **Enhancement** (Pro): A new filter allows overriding the default behavior to clear the user cache upon login and logout when caching for Logged-In Users is enabled. See [this article](https://cometcache.com/r/kb-article-how-can-i-prevent-the-user-cache-from-being-cleared-upon-login-or-logout/) for details. Props @KTS915. See [Issue #756](https://github.com/websharks/comet-cache/issues/756).

= v160417 =

- **Bug Fix**: Fixed a "PHP Fatal error: Undefined class constant 'CACHE_PATH_NO_SCHEME'" introduced by the previous release (v160416). This issue only affected sites where Feed Caching was enabled (_Comet Cache → Plugin Options → RSS, RDF, and Atom Feeds_). Props to MassimoD and @emanwebdev for reporting. See [Issue #739](https://github.com/websharks/comet-cache/issues/739).
Expand Down
2 changes: 1 addition & 1 deletion comet-cache-pro.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
Version: 160514-RC
Version: 160521
Text Domain: comet-cache
Plugin Name: Comet Cache Pro
Network: true
Expand Down
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
"websharks/html-compressor": "160118",
"websharks/sharkicons": "160221"
},
"require-lite": {
"php": ">=5.4",
"websharks/wp-php-rv": "160504",
"websharks/sharkicons": "160221"
},
"require-dev": {
"package/bourbon": "4.2.3",
"websharks/wp-i18n-tools": "dev-master"
Expand Down
2 changes: 1 addition & 1 deletion phings
10 changes: 9 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
=== Comet Cache ===

Stable tag: 160514-RC
Stable tag: 160521
Requires at least: 4.2
Tested up to: 4.6-alpha
Text Domain: comet-cache
Expand Down Expand Up @@ -336,6 +336,14 @@ Requires WordPress v4.2+.

== Changelog ==

= v160521 =

- **Bug Fix**: Fixed a bug that, in some scenarios, resulted in "PHP Fatal error: Undefined class constant 'CACHE_PATH_NO_PATH_INDEX'". This also affected the Cache Statistics feature (Comet Cache Pro), resulting in a blank panel when hovering over the Cache Stats button in the menu bar. See [Issue #752](https://github.com/websharks/comet-cache/issues/752).
- **Bug Fix**: When the PHP OPCache extension is active, the OPCache is now cleared when a WordPress plugin is upgraded, activated, or deactivated. This works around an issue that could produce a fatal error when the PHP OPCache contains cached PHP code that conflicts with new PHP code introduced by an update. See [Issue #740](https://github.com/websharks/comet-cache/issues/740).
- **Enhancement** (Pro): It's now possible to disable the WordPress Admin Toolbar when Logged-In User Caching is enabled with a new option in _Comet Cache → Plugin Options → Logged-In Users → Disable the Admin Toolbar for Logged-In Users & Comment Authors?_ Props @renzms and @KTS915. See [Issue #690](https://github.com/websharks/comet-cache/issues/690).
- **Enhancement**: The the option to automatically clear the cache for Custom Term Archive Views (see _Comet Cache → Plugin Options → Automatic Cache Clearing → Auto-Clear "Custom Term Archives" Too?_) is now enabled by default. This feature was previously disabled by default, which lead to confusion about why those cache files were not being cleared automatically when a Custom Post Type with a Custom Term Archive View was being used. Props @renzms. See [Issue #693](https://github.com/websharks/comet-cache/issues/693).
- **Enhancement** (Pro): A new filter allows overriding the default behavior to clear the user cache upon login and logout when caching for Logged-In Users is enabled. See [this article](https://cometcache.com/r/kb-article-how-can-i-prevent-the-user-cache-from-being-cleared-upon-login-or-logout/) for details. Props @KTS915. See [Issue #756](https://github.com/websharks/comet-cache/issues/756).

= v160417 =

- **Bug Fix**: Fixed a "PHP Fatal error: Undefined class constant 'CACHE_PATH_NO_SCHEME'" introduced by the previous release (v160416). This issue only affected sites where Feed Caching was enabled (_Comet Cache → Plugin Options → RSS, RDF, and Atom Feeds_). Props to MassimoD and @emanwebdev for reporting. See [Issue #739](https://github.com/websharks/comet-cache/issues/739).
Expand Down
5 changes: 3 additions & 2 deletions src/client-s/js/menu-pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
$('[data-action]', plugin.$menuPage).on('click', plugin.doDataAction);
$('[data-toggle-target]', plugin.$menuPage).on('click', plugin.doDataToggleTarget);

$('select[name$="_enable\\]"]', plugin.$menuPage).not('.-no-if-enabled').on('change', plugin.enableDisable).trigger('change');
$('select[name$="_enable\\]"], select[data-toggle~="enable-disable"]', plugin.$menuPage).not('.-no-if-enabled').on('change', plugin.enableDisable).trigger('change');

/*![pro strip-from='lite']*/
$('textarea[name$="\[cdn_hosts\]"]', plugin.$menuPage).on('input propertychange', plugin.handleCdnHostsChange);
Expand Down Expand Up @@ -75,7 +75,8 @@
var $this = $(this),
thisValue = $this.val(),
thisName = $this.attr('name'),
enabled = Number(thisValue) >= 1,
thisEnabledStrings = String($this.data('enabledStrings') || '1,2,3,4,5').split(/,+/),
enabled = $.inArray(thisValue, thisEnabledStrings) !== -1,

$thisPanelBody = $this.closest('.plugin-menu-page-panel-body'),

Expand Down
4 changes: 2 additions & 2 deletions src/client-s/js/menu-pages.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 13 additions & 10 deletions src/includes/classes/Actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -798,17 +798,20 @@ protected function proUpdate($args)
]);
$this->plugin->dismissMainNotice('new-pro-version-available');

$redirect_to = self_admin_url('/update.php');
$query_args = [ // Like a normal WP plugin.
'action' => 'upgrade-plugin',
'plugin' => plugin_basename(PLUGIN_FILE),
'_wpnonce' => wp_create_nonce('upgrade-plugin_'.plugin_basename(PLUGIN_FILE)),

// See: `preSiteTransientUpdatePlugins()` where these are picked up.
GLOBAL_NS.'_update_pro_version' => apply_filters(GLOBAL_NS.'_update_pro_version', $product_api_response->pro_version),
GLOBAL_NS.'_update_pro_zip' => base64_encode(apply_filters(GLOBAL_NS.'_update_pro_zip', $product_api_response->pro_zip)),
// @TODO Encrypt/decrypt to avoid mod_security issues. Base64 is not enough.
$update_pro_version = $this->plugin->applyWpFilters(GLOBAL_NS.'_update_pro_version', $product_api_response->pro_version);
$update_pro_zip = $this->plugin->applyWpFilters(GLOBAL_NS.'_update_pro_zip', $product_api_response->pro_zip);
$redirect_to = self_admin_url('/update.php');
$query_args = [ // Like a normal WP plugin.
'action' => 'upgrade-plugin',
'plugin' => plugin_basename(PLUGIN_FILE),
'_wpnonce' => wp_create_nonce('upgrade-plugin_'.plugin_basename(PLUGIN_FILE)),
GLOBAL_NS.'_update_pro_version' => $update_pro_version,
];

// Store the Pro Zip URL in Transient with a 5 minute expiration
// See: `preSiteTransientUpdatePlugins()` where these are picked up.
set_site_transient(GLOBAL_NS.'_update_pro_zip_'.$update_pro_version, $update_pro_zip, 60*5);

$redirect_to = add_query_arg(urlencode_deep($query_args), $redirect_to);

wp_redirect($redirect_to).exit();
Expand Down
Loading

0 comments on commit 2d2a5e5

Please # to comment.