From: Chuck Scott Date: Tue, 23 May 2017 15:54:36 +0000 (-0400) Subject: Fixed cache logic not checking for the shortcode name when processing shortcode list... X-Git-Tag: v2.9.16^2~3 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=467979aa77c588252e0ea7fc439fb477f12c4357;p=WP-Plugins%2Fglm-member-db.git Fixed cache logic not checking for the shortcode name when processing shortcode list looking for cache control data. --- diff --git a/controllers/front.php b/controllers/front.php index 276d555d..ea329d5f 100644 --- a/controllers/front.php +++ b/controllers/front.php @@ -292,13 +292,14 @@ class glmMembersFront extends GlmPluginSupport // Check shortcode for cache configuration $scCacheControl = false; foreach ($this->config['addOns'] as $addon) { - foreach ($addon['shortcodes'] as $sc) { - if (isset($sc['cacheControl'])) { - $scCacheControl = $sc['cacheControl']; + while (list($key, $val) = each($addon['shortcodes'])) { + if ($key == $shortcode && isset($val['cacheControl'])) { + $scCacheControl = $val['cacheControl']; } } } + // If cache control is enabled for this shortcode if ($scCacheControl && $scCacheControl['active']) { // Create cache_code for this request