commenting out the packages attributes currently until I can get all of the values...
authorAnthony Talarico <talarico@gaslightmedia.com>
Mon, 9 May 2016 14:50:13 +0000 (10:50 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Mon, 9 May 2016 14:50:13 +0000 (10:50 -0400)
setup/shortcodeBuilder.php

index a300626..6ae6bc1 100644 (file)
@@ -2,17 +2,47 @@
     /*
     * Packages Shortcode Attributes
     */
+    function nicePrint($array){
+        echo '<pre>', print_r($array), '</pre>';
+    }
+
     require_once(GLM_MEMBERS_PACKAGING_PLUGIN_CLASS_PATH.'/data/dataPackages.php');
+    
+    
+    $packageListAttr = $this->config['addOns']['glm-member-db-packaging']['shortcodes']['glm-members-packaging-list']['attributes'];
+    $packageDetailAttr = $this->config['addOns']['glm-member-db-packaging']['shortcodes']['glm-members-packaging-detail'];
+    $packageListAttrValues = $this->config['addOns']['glm-member-db-packaging']['shortcodes']['glm-members-packaging-list']['attributes'];
+    $packageDetailAttrValues = $this->config['addOns']['glm-member-db-packaging']['shortcodes']['glm-members-packaging-detail']['attributes'];
 
+    // get list of packages shortcodes
     $package = new GlmDataPackages($this->wpdb, $this->config);
     $packageList = $package->getList();
 
     foreach($packageList as $key=>$value){
         $packageListId[] = $value['id'];
     }
+    
+    // loop through packaging list shortcode attributes
+    foreach($packageListAttr as $key=>$value){
+        $listAttributes[] = $key;
+        $values[] = $value;
+     }
 
-
-    //dropdown for package list 'type' attr
+//    echo '<span id="packageListAttr">';
+//    $count = 0;
+//    foreach($listAttributes as $list=>$value){
+//        echo '<select id="packageList-' . $count . '-scDropdown">';
+//        echo '<option value=' .$value . ' selected="selected">' . $value. '</option>';
+//        echo '</select>';
+//        $count++;
+//    }
+//    echo '</span>';
+     
+     /* IDs are used as placeholders currently until the attributes and their values are 
+      figured out
+     
+     dropdown for package list 'type' attr  */
+     
     echo '<select id="type-scDropdown">';
     echo  '<option disabled="disabled">Package Type</option>';