From: Laury GvR Date: Wed, 15 Jun 2016 16:42:30 +0000 (-0400) Subject: additional forms? X-Git-Tag: v2.1.16^2~5^2~17 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=aed5a2b0bd4751079542c36c8cae5f1ccb1c85eb;p=WP-Plugins%2Fglm-member-db.git additional forms? --- diff --git a/classes/glmPluginSupport.php b/classes/glmPluginSupport.php index deae9f96..461a67d2 100644 --- a/classes/glmPluginSupport.php +++ b/classes/glmPluginSupport.php @@ -350,15 +350,25 @@ return; // Off for now ** Need to make this switchable in management $value = $this->wpdb->get_var("SELECT ID FROM ".$this->wpdb->posts." WHERE post_name = '".$postName."'"); return $value; } - + + public function nicePrint($array){ + echo '
', print_r($array), '
'; + } + /** * * Shortcode Builder Functions * */ - + private $shortcodeCounter = 0; + private function get_shortcode_count() { + return $this->shortcodeCounter; + } + private function increase_shortcode_count() { + $this->shortcodeCounter += 1; + } public function glmMembersShortcode(){ - + // load shortcodeBuilder.js when the shortcode function has been fired if it hasn't been enqueued yet if( ! wp_script_is( 'jquery-ui-dialog', 'enqueued' ) ){ wp_enqueue_style('jquery-style', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css'); @@ -394,40 +404,10 @@ return; // Off for now ** Need to make this switchable in management } - // metabox content - public function shortcode_builder_markup(){ - - require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataCategories.php'); - - $listAttr = $this->config['addOns']['glm-member-db']['shortcodes']['glm-members-list']['attributes']; - $detailAttr = $this->config['addOns']['glm-member-db']['shortcodes']['glm-member-detail']['attributes']; - - $glmcat = new GlmDataCategories($this->wpdb, $this->config); - $list = $glmcat->getListSortedParentChild(); - // get the each addOn slugs to pass to the config array later - $addOns = $this->config['addOns']; - foreach($addOns as $addOn){ - if(!is_array($addOn['slug'])){ - $addOnSlugs[] = $addOn['slug']; - } - } - - // use the addOn slugs to access each of the shortcodes - foreach($addOnSlugs as $addOn){ - $shortCodeList[] = $this->config['addOns'][$addOn]['shortcodes']; - } - - // loop through the shortcodes to pull out the shortcode names - foreach($shortCodeList as $addonInfo) { - foreach($addonInfo as $shortCode=>$value){ -// echo "
".print_r($value, true)."
"; - if(!is_array($shortCode)){ - $shortCodes[] = $shortCode; - } - } - } + public function shortcode_builder_markup_template($shortCodes, $list) { //dropdown for shortcode names - echo '
'; + $this->increase_shortcode_count(); + echo '
'; echo '
'; echo '