fixing shortcode builder's intial check for shortcodes in the page editor so that...
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 21 Oct 2016 17:38:59 +0000 (13:38 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 21 Oct 2016 17:38:59 +0000 (13:38 -0400)
js/shortcodeBuilder.js

index e3c2ce8..bc1871a 100644 (file)
@@ -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();
         }