From: Anthony Talarico Date: Fri, 21 Oct 2016 17:38:59 +0000 (-0400) Subject: fixing shortcode builder's intial check for shortcodes in the page editor so that... X-Git-Tag: v2.8.0^2~4^2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=26124b91b3e6954b60a11f661dd4bb93240ee25e;p=WP-Plugins%2Fglm-member-db.git fixing shortcode builder's intial check for shortcodes in the page editor so that it doesn't matter which sc attribute is already added --- diff --git a/js/shortcodeBuilder.js b/js/shortcodeBuilder.js index e3c2ce84..bc1871ad 100644 --- a/js/shortcodeBuilder.js +++ b/js/shortcodeBuilder.js @@ -121,8 +121,9 @@ jQuery(document).ready(function ($) { if(editor_shortcodes){ // get the number of instances of shortcodes with the category option - var number_of_categories = (editor_shortcodes.match(/glm-members-list category="(.*?)"/g) || []).length; + var number_of_categories = (editor_shortcodes.match(/(\[glm-members-list .*?])/) || []).length; if ( number_of_categories ) { + console.log("Test"); $('#glmRemoveShortCode').show(); $('#generate').hide(); }