Skip to content

Commit

Permalink
Merge branch 'release/160221'
Browse files Browse the repository at this point in the history
  • Loading branch information
raamdev committed Feb 22, 2016
2 parents bc11142 + 7e54954 commit 3cab1a6
Show file tree
Hide file tree
Showing 36 changed files with 775 additions and 608 deletions.
48 changes: 48 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions assets/assets-lite/banner-772x250.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/banner-772x250.psd
Git LFS file not shown
3 changes: 3 additions & 0 deletions assets/options-changing-name.sketch
Git LFS file not shown
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"require": {
"php": ">=5.3",
"websharks/wp-php-rv": "150511",
"websharks/html-compressor": "150923",
"websharks/sharkicons": "150820"
"websharks/html-compressor": "160118",
"websharks/sharkicons": "160221"
},
"require-dev": {
"package/bourbon": "4.2.3",
Expand Down
24 changes: 12 additions & 12 deletions composer.lock

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

2 changes: 1 addition & 1 deletion phings
31 changes: 29 additions & 2 deletions plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@
$GLOBALS['wp_php_rv'] = '5.3.2'; //php-required-version// // Leaving this at v5.3.2 so that we can have more control over Dashboard messages below.

if (require(dirname(__FILE__).'/src/vendor/websharks/wp-php-rv/src/includes/check.php')) {
if (!empty($_REQUEST['zencache_mbstring_deprecated_warning_bypass']) && is_admin()) {
update_site_option('zencache_mbstring_deprecated_warning_bypass', time());
}

${__FILE__}['apc_enabled'] = (extension_loaded('apc') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) && filter_var(ini_get('apc.cache_by_default'), FILTER_VALIDATE_BOOLEAN) && stripos((string)ini_get('apc.filters'), 'zencache') === false) ? true : false;

if ((!version_compare(PHP_VERSION, '5.4', '>=') || ${__FILE__}['apc_enabled'])) {
if ((!version_compare(PHP_VERSION, '5.4', '>=') || ${__FILE__}['apc_enabled'])) { // If PHP <= 5.4 or APC is enabled

if (!version_compare(PHP_VERSION, '5.4', '>=') && is_admin()) {
${__FILE__}['php54_notice'] = '<h3 style="margin:.5em 0 .25em 0;">'.__('<strong>NOTICE: ZenCache Minimum PHP Version</strong></h3>', 'zencache');
Expand Down Expand Up @@ -56,7 +60,30 @@
)
);
}
} else {
} else { // Load the plugin

if (!extension_loaded('mbstring') && !get_site_option('zencache_mbstring_deprecated_warning_bypass') && is_admin()) {
${__FILE__}['mbstring_deprecated_warning'] = '<h3 style="margin:.5em 0 .25em 0;">'.__('<strong>NOTICE: ZenCache Will Require the PHP <code>mbstring</code> Extension</strong></h3>', 'zencache');
${__FILE__}['mbstring_deprecated_warning'] .= '<p style="margin-top:0;">'.sprintf(__('<strong>After March 1st, 2016 ZenCache will require PHP Multibyte String support.</strong> It appears that your site is currently running PHP v%1$s <strong>without</strong> the <code>mbstring</code> extension enabled. You will need to contact your web hosting company and have them enable the PHP <code>mbstring</code> extension if you want to run the next version of ZenCache.', 'zencache'), esc_html(PHP_VERSION)).'</p>';
${__FILE__}['mbstring_deprecated_warning'] .= '<p style="margin-top:0;">'.__('The <code>mbstring</code> 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, ZenCache will be unstable. For that reason we are requiring the <code>mbstring</code> extension to improve reliability when caching and to prevent your site from experiencing unforeseen issues in the future.', 'zencache').'</p>';
${__FILE__}['mbstring_deprecated_warning'] .= '<p style="margin-bottom:.5em;">'.__('<a href="'.esc_attr(add_query_arg('zencache_mbstring_deprecated_warning_bypass', '1')).'" onclick="if(!confirm(\'Are you sure? Press OK to continue, or Cancel to stop and read carefully.\')) return false;">Dismiss this notice.</a>', 'zencache').'</p>';

add_action(
'all_admin_notices', create_function(
'', 'if(!current_user_can(\'activate_plugins\'))'.
' return;'."\n".// User missing capability.

'echo \''.// Wrap `$notice` inside a WordPress error.

'<div class="notice notice-warning">'.
' '.str_replace("'", "\\'", ${__FILE__}['mbstring_deprecated_warning']).
'</div>'.

'\';'
)
);
}

require_once dirname(__FILE__).'/src/includes/plugin.php';
}
} else {
Expand Down
Loading

0 comments on commit 3cab1a6

Please sign in to comment.