From 26124b91b3e6954b60a11f661dd4bb93240ee25e Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Fri, 21 Oct 2016 13:38:59 -0400 Subject: [PATCH] fixing shortcode builder's intial check for shortcodes in the page editor so that it doesn't matter which sc attribute is already added --- js/shortcodeBuilder.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); } -- 2.17.1