From: Chuck Scott Date: Fri, 13 May 2016 19:56:30 +0000 (-0400) Subject: Merge branch 'develop' of cvs2:WP-Plugins/glm-member-db into develop X-Git-Tag: v2.0.0^2~21 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=2563d1aac2576e91d3ee96d1d4ca48fe8b27f77f;p=WP-Plugins%2Fglm-member-db.git Merge branch 'develop' of cvs2:WP-Plugins/glm-member-db into develop Conflicts: controllers/admin.php --- 2563d1aac2576e91d3ee96d1d4ca48fe8b27f77f diff --cc classes/glmPluginSupport.php index d4fa9866,d4fa9866..211ed3c1 --- a/classes/glmPluginSupport.php +++ b/classes/glmPluginSupport.php @@@ -426,6 -426,6 +426,325 @@@ class GlmPluginSuppor return $all_db_setup_status; } ++ /** ++ * Display Git Branch as an admin warning ++ * ++ * @return void ++ * @access public ++ */ ++ function glmMembersGitNotice() { ++ ++ echo '

Plugin Git Branch Warning:

'; ++ foreach ($this->gitBranch as $b) { ++ ++ echo ''; ++ ++ } ++ echo "
'.$b['slug'].''.$b['branch']; ++ if (isset($b['feature'])) { ++ echo '/'.$b['feature']; ++ } ++ echo '
"; ++ } ++ ++ /** ++ * Get Git Branch ++ * ++ * @return void ++ * @access public ++ */ ++ public function getGitBranch() ++ { ++ $gitBranch = array(); ++ ++ foreach ($this->config['addOns'] as $a) { ++ ++ // Git branch should be stored in .git/HEAD file ++ $gitFile = GLM_MEMBERS_WORDPRESS_PLUGIN_PATH.'/'.$a['slug'].'/.git/HEAD'; ++ ++ // Check if the file exists ++ if (file_exists($gitFile)) { ++ ++ // Read in the file ++ $gitString = file_get_contents($gitFile); ++ ++ // Parse the branch string by '/' ++ $gitParts = explode('/', $gitString); ++ ++ if (trim($gitParts[2]) != 'master') { ++ ++ $gitBranch[$a['slug']]['slug'] = $a['slug']; ++ ++ // [2] should be branch name or type ++ if (isset($gitParts[2])) { ++ $gitBranch[$a['slug']]['branch'] = $gitParts[2]; ++ } ++ ++ // [3] should be name of feature ++ if (isset($gitParts[3])) { ++ $gitBranch[$a['slug']]['feature'] = $gitParts[3]; ++ } ++ ++ } ++ ++ } ++ ++ } ++ ++ $this->gitBranch = $gitBranch; ++ return; ++ ++ } ++ ++ /** ++ * ++ * Create new standard pages with shortcodes ++ * ++ */ ++ ++ /** ++ * get_option(GLM_MEMBERS_PLUGIN_OPTION_MEMBERS_ONLY_ID) ++ * ++ * Create new pages containing the member DB shortcodes ++ * ++ * @return void ++ */ ++ public function createPages($requiredPages) ++ { ++ foreach($requiredPages as $requiredPage => $requiredPageInfo) { ++ $trimmedName = GLM_MEMBERS_PLUGIN_OPTION_PREFIX.$requiredPageInfo['underscored_name']; ++ if ($requiredPageInfo['parent'] == 'associate') { ++ $postParent = get_option(GLM_MEMBERS_PLUGIN_OPTION_ASSOCIATE_ID); ++ } else if ($requiredPageInfo['parent'] == 'membersonly') { ++ $postParent = get_option(GLM_MEMBERS_PLUGIN_OPTION_MEMBERS_ONLY_ID); ++ } else if (is_numeric($requiredPageInfo['parent'])) { ++ $postParent = $requiredPageInfo['parent']; ++ } else { ++ $postParent = '0'; ++ } ++ $existingPost = get_post(get_option($trimmedName)); ++ $testSlug = get_post_field( 'post_name', $existingPost); ++ $newSlug = sanitize_title($requiredPageInfo['name']); ++ $existingSlug = $this->verify_post_slug($newSlug); ++ ++ ++ // If a post with the ID set in the option does not exist ++ if ( !$existingPost) { ++ ++ // If the new slug corresponds to an already existent page, yet the ID option does not exist, ++ // then it's either the first time this plugin is run on an outdated site or somehow the ID was ++ // deleted. Either way, replace the option value with whatever is the ID of the page matching ++ // that slug. The slug is checked by translating the page title. ++ if ($newSlug == $existingSlug) { ++ $existingID = $this->get_post_id_by_slug($newSlug); ++ update_option($trimmedName, $existingID); ++ // Otherwise create a new page ++ } else { ++ // Put together the new page, then update the option with the new ID ++ $templateUsed = isset($requiredPageInfo['template']) ? $requiredPageInfo['template'] : 'index.php'; ++ $new_id = $this->insertReqPage( ++ $requiredPageInfo['name'], ++ $requiredPageInfo['content'], ++ 'publish', ++ 'page', ++ '1', ++ $templateUsed, ++ $postParent ++ ); ++ update_option($trimmedName, $new_id); ++ ++ // Make extra page if members only is created ++ if ($new_id == get_option(GLM_MEMBERS_PLUGIN_OPTION_MEMBERS_ONLY_ID)) { ++ $this->insertReqPage( ++ 'Members Only Sample Subpage', ++ 'This page will automatically be locked to Members Only with the members-only-template', ++ 'publish', ++ 'page', ++ '1', ++ $templateUsed, ++ $new_id ++ ); ++ ++ } ++ } ++ } else { ++ // No page created ++ } ++ } ++ ++ } ++ ++ public function insertReqPage($pTitle = '--bad page--', $pContent = '', $pPublish = 'publish', $pType = 'page', $pAuthor = '1', $pTemplate = 'index.php', $pParent = '0') ++ { ++ $new_page = array( ++ 'post_title' => $pTitle, ++ 'post_content' => $pContent, ++ 'post_status' => $pPublish, ++ 'post_type' => $pType, ++ 'post_author' => $pAuthor, ++ 'page_template' => $pTemplate , ++ 'post_parent' => $pParent ++ ); ++ return wp_insert_post($new_page); ++ } ++ ++ ++ public function get_post_data($needle = 1, $valueField = 'post_name', $needleField = 'ID') ++ { ++ $value = $this->wpdb->get_var("SELECT $valueField FROM ".$this->wpdb->posts." WHERE $needleField = '".$needle."'"); ++ return $value; ++ } ++ ++ public function verify_post_slug($postName) ++ { ++ $value = $this->wpdb->get_var("SELECT post_name FROM ".$this->wpdb->posts." WHERE post_name = '".$postName."'"); ++ return $value; ++ } ++ ++ public function get_post_id_by_slug($postName) ++ { ++ $value = $this->wpdb->get_var("SELECT ID FROM ".$this->wpdb->posts." WHERE post_name = '".$postName."'"); ++ return $value; ++ } ++ ++ /** ++ * ++ * Shortcode Builder Functions ++ * ++ */ ++ ++ public function glmMembersShortcode(){ ++ ++ // load shortcodeBuilder.js when the shortcode function has been fired ++ add_action('admin_print_styles-post.php', 'custom_js_css'); ++ add_action('admin_print_styles-post-new.php', 'custom_js_css'); ++ ++ function custom_js_css() { ++ ++ wp_enqueue_script('your-meta-box', GLM_MEMBERS_PLUGIN_URL. '/js/shortcodeBuilder.js', array('jquery'), null, true); ++ } ++ reset($this->config['addOns']); ++ foreach ($this->config['addOns'] as $a) { ++ $cssFile = GLM_MEMBERS_WORDPRESS_PLUGIN_PATH.$a['slug'].'/css/admin.css'; ++ if (is_file($cssFile)) { ++ $cssName = $a['slug'].'-admin-css'; ++ wp_register_style( ++ $cssName, ++ GLM_MEMBERS_WORDPRESS_PLUGIN_URL.'/'.$a['slug'].'/css/admin.css', ++ false, ++ GLM_MEMBERS_PLUGIN_VERSION ++ ); ++ wp_enqueue_style($cssName); ++ } ++ } ++ ++ add_meta_box("shortcode_builder", ++ "Shortcode Builder", ++ array($this,'shortcode_builder_markup'), ++ "page", 'normal', 'high' ++ ); ++ ++ } ++ ++ // 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->wpconfig); ++ $list = $glmcat->getList(); ++ // 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){ ++ if(!is_array($shortCode)){ ++ $shortCodes[] = $shortCode; ++ } ++ } ++ } ++ ++ //dropdown for shortcode names ++ echo '
'; ++ echo ''; ++ ++ /* ++ * Member DB Shortcode Attributes ++ */ ++ ++ //dropdown for categories ++ echo ''; ++ ++ // dropdown for blank start ++ echo ''; ++ ++ // dropdown for views ++ echo ''; ++ ++ // show list options 'scb' = shortcode builder acronym ++ echo '
'; ++ echo ''; ++ echo ''; ++ foreach($listAttr as $key=>$value){ ++ if($value != ''){ ++ echo ''; ++ } ++ } ++ echo '
'; ++ ++ // show detail options ++ echo '
'; ++ echo ''; ++ echo ''; ++ foreach($detailAttr as $key=>$value){ ++ if($value != ''){ ++ echo ''; ++ } ++ } ++ echo '
'; ++ ++ // packaging addOn mark up ++ if(file_exists(GLM_MEMBERS_PACKAGING_PLUGIN_PATH . "/setup/shortcodeBuilder.php")){ ++ include GLM_MEMBERS_PACKAGING_PLUGIN_PATH . "/setup/shortcodeBuilder.php"; ++ } ++ ++ // list and detail buttons to open dialog for member db 'show' attr options ++ echo ''; ++ echo ''; ++ ++ echo ''; ++ ++ } ++ } /* @@@ -559,3 -559,3 +878,5 @@@ function glmMembersInstallErrorsNotice( echo '

Plugin Git Branch Warning:


'.$installErrors.'
'; delete_option('glmMembersInstallErrors'); } ++ ++ diff --cc controllers/admin.php index ba4522f8,556cecac..51f82ced --- a/controllers/admin.php +++ b/controllers/admin.php @@@ -213,132 -213,178 +213,6 @@@ class glmMembersAdmin extends GlmPlugin } -- -- } -- /*get_option(GLM_MEMBERS_PLUGIN_OPTION_MEMBERS_ONLY_ID) -- * Create new pages containing the member DB shortcodes -- * @return void -- */ - public function createPages($requiredPages) - public function createPages($requiredPages) -- { -- foreach($requiredPages as $requiredPage => $requiredPageInfo) { - $trimmedName = GLM_MEMBERS_PLUGIN_OPTION_PREFIX.$requiredPageInfo['optionSuffix']; - $trimmedName = GLM_MEMBERS_PLUGIN_OPTION_PREFIX.$requiredPageInfo['underscored_name']; -- if ($requiredPageInfo['parent'] == 'associate') { -- $postParent = get_option(GLM_MEMBERS_PLUGIN_OPTION_ASSOCIATE_ID); -- } else if ($requiredPageInfo['parent'] == 'membersonly') { -- $postParent = get_option(GLM_MEMBERS_PLUGIN_OPTION_MEMBERS_ONLY_ID); -- } else if (is_numeric($requiredPageInfo['parent'])) { -- $postParent = $requiredPageInfo['parent']; -- } else { -- $postParent = '0'; -- } - if ( !get_post(get_option($trimmedName))) { - $duplicatePage = get_page_by_title($requiredPageInfo['name']); - //echo $duplicatePage; - echo $duplicatePage->title; - echo $duplicatePage->title->ID; - if ($duplicatePage->title == $requiredPageInfo['name']) { - update_option($trimmedName, $duplicatePage->ID); - $existingPost = get_post(get_option($trimmedName)); - $testSlug = get_post_field( 'post_name', $existingPost); - $newSlug = sanitize_title($requiredPageInfo['name']); - $existingSlug = $this->verify_post_slug($newSlug); - - - // If a post with the ID set in the option does not exist - if ( !$existingPost) { - - // If the new slug corresponds to an already existent page, yet the ID option does not exist, - // then it's either the first time this plugin is run on an outdated site or somehow the ID was - // deleted. Either way, replace the option value with whatever is the ID of the page matching - // that slug. The slug is checked by translating the page title. - if ($newSlug == $existingSlug) { - $existingID = $this->get_post_id_by_slug($newSlug); - update_option($trimmedName, $existingID); - // Otherwise create a new page -- } else { - $new_page = array( - 'post_title' => $requiredPageInfo['name'], - 'post_content' => $requiredPageInfo['content'], - 'post_status' => 'publish', - 'post_type' => 'page', - 'post_author' => '1', - 'page_template' => isset($requiredPageInfo['template']) ? $requiredPageInfo['template'] : 'index.php' , - 'post_parent' => $postParent - ); - $new_id = wp_insert_post($new_page); - // Put together the new page, then update the option with the new ID - $templateUsed = isset($requiredPageInfo['template']) ? $requiredPageInfo['template'] : 'index.php'; - $new_id = $this->insertReqPage( - $requiredPageInfo['name'], - $requiredPageInfo['content'], - 'publish', - 'page', - '1', - $templateUsed, - $postParent - ); -- update_option($trimmedName, $new_id); -- -- // Make extra page if members only is created -- if ($new_id == get_option(GLM_MEMBERS_PLUGIN_OPTION_MEMBERS_ONLY_ID)) { - $sample_page = array( - 'post_title' => 'Members Only Sample Subpage', - 'post_content' => 'This page will automatically be locked to Members Only with the members-only-template', - 'post_status' => 'publish', - 'post_type' => 'page', - 'post_author' => '1', - 'page_template' => isset($requiredPageInfo['template']) ? $requiredPageInfo['template'] : 'index.php' , - 'post_parent' => $new_id - $this->insertReqPage( - 'Members Only Sample Subpage', - 'This page will automatically be locked to Members Only with the members-only-template', - 'publish', - 'page', - '1', - $templateUsed, - $new_id -- ); - wp_insert_post($sample_page); - -- } -- } - } else { - // No page created -- } -- } - -- } - - - - public function insertReqPage($pTitle = '--bad page--', $pContent = '', $pPublish = 'publish', $pType = 'page', $pAuthor = '1', $pTemplate = 'index.php', $pParent = '0') - { - $new_page = array( - 'post_title' => $pTitle, - 'post_content' => $pContent, - 'post_status' => $pPublish, - 'post_type' => $pType, - 'post_author' => $pAuthor, - 'page_template' => $pTemplate , - 'post_parent' => $pParent - ); - return wp_insert_post($new_page); - } - - - public function get_post_data($needle = 1, $valueField = 'post_name', $needleField = 'ID') - { - $value = $this->wpdb->get_var("SELECT $valueField FROM ".$this->wpdb->posts." WHERE $needleField = '".$needle."'"); - return $value; - } - - public function verify_post_slug($postName) - { - $value = $this->wpdb->get_var("SELECT post_name FROM ".$this->wpdb->posts." WHERE post_name = '".$postName."'"); - return $value; - } - - public function get_post_id_by_slug($postName) - { - $value = $this->wpdb->get_var("SELECT ID FROM ".$this->wpdb->posts." WHERE post_name = '".$postName."'"); - return $value; - } - -- /** -- * Get Git Branch -- * -- * @return void -- * @access public -- */ -- public function getGitBranch() -- { -- $gitBranch = array(); -- -- foreach ($this->config['addOns'] as $a) { -- -- // Git branch should be stored in .git/HEAD file -- $gitFile = GLM_MEMBERS_WORDPRESS_PLUGIN_PATH.'/'.$a['slug'].'/.git/HEAD'; -- -- // Check if the file exists -- if (file_exists($gitFile)) { -- -- // Read in the file -- $gitString = file_get_contents($gitFile); -- -- // Parse the branch string by '/' -- $gitParts = explode('/', $gitString); -- -- if (trim($gitParts[2]) != 'master') { -- -- $gitBranch[$a['slug']]['slug'] = $a['slug']; -- -- // [2] should be branch name or type -- if (isset($gitParts[2])) { -- $gitBranch[$a['slug']]['branch'] = $gitParts[2]; -- } -- -- // [3] should be name of feature -- if (isset($gitParts[3])) { -- $gitBranch[$a['slug']]['feature'] = $gitParts[3]; -- } -- -- } -- -- } -- -- } -- -- $this->gitBranch = $gitBranch; -- return; -- -- } -- -- /** -- * Display Git Branch as an admin warning -- * -- * @return void -- * @access public -- */ -- function glmMembersGitNotice() { -- -- echo '

Plugin Git Branch Warning:

'; -- foreach ($this->gitBranch as $b) { -- -- echo ''; -- -- } -- echo "
'.$b['slug'].''.$b['branch']; -- if (isset($b['feature'])) { -- echo '/'.$b['feature']; -- } -- echo '
"; } /** @@@ -622,138 -668,159 +496,10 @@@ $glm_dashboard_widget = $wp_meta_boxes['dashboard']['normal']['core']['glm_members_admin_dashboard_widget']; unset($wp_meta_boxes['dashboard']['normal']['core']['glm_members_admin_dashboard_widget']); $wp_meta_boxes['dashboard']['side']['core']['glm_members_admin_dashboard_widget'] = $glm_dashboard_widget; - - - } - } - public function glmMembersShortcode(){ - - // load shortcodeBuilder.js when the shortcode function has been fired - add_action('admin_print_styles-post.php', 'custom_js_css'); - add_action('admin_print_styles-post-new.php', 'custom_js_css'); - - // tried calling the adminScripts function here but it throws js errors in the console - wp_enqueue_script('jquery', false, array(), false, true); - wp_enqueue_script('jquery-style', false, array(), false, true); - wp_enqueue_script('jquery-ui-core', false, array(), false, true); - wp_enqueue_script('jquery-ui-widget', false, array(), false, true); - wp_enqueue_script('jquery-ui-dialog', false, array(), false, true); - wp_enqueue_script('jquery-ui-autocomplete', false, array(), false, true); - - // Jquery DatePicker - wp_enqueue_script('jquery-ui-datepicker'); - wp_enqueue_style('jquery-style', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css'); - - function custom_js_css() { - - wp_enqueue_script('your-meta-box', GLM_MEMBERS_PLUGIN_URL. '/js/shortcodeBuilder.js', array('jquery'), null, true); - } - reset($this->config['addOns']); - foreach ($this->config['addOns'] as $a) { - $cssFile = GLM_MEMBERS_WORDPRESS_PLUGIN_PATH.$a['slug'].'/css/admin.css'; - if (is_file($cssFile)) { - $cssName = $a['slug'].'-admin-css'; - wp_register_style( - $cssName, - GLM_MEMBERS_WORDPRESS_PLUGIN_URL.'/'.$a['slug'].'/css/admin.css', - false, - GLM_MEMBERS_PLUGIN_VERSION - ); - wp_enqueue_style($cssName); - } - } - - add_meta_box("shortcode_builder", - "Shortcode Builder", - array($this,'shortcode_builder_markup'), - "page", 'normal', 'high' - ); - - } -// // 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->wpconfig); - $list = $glmcat->getList(); - // 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']; - } - } - } - } - public function glmMembersShortcode(){ - - // load shortcodeBuilder.js when the shortcode function has been fired - add_action('admin_print_styles-post.php', 'custom_js_css'); - add_action('admin_print_styles-post-new.php', 'custom_js_css'); - // 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){ - if(!is_array($shortCode)){ - $shortCodes[] = $shortCode; - } - } - } -// /* -// * HTML Markup for the shortodes -// */ -// if(file_exists(GLM_MEMBERS_EVENTS_PLUGIN_PATH . "/setup/shortcodeBuilder.php")){ -// include GLM_MEMBERS_EVENTS_PLUGIN_PATH . "/setup/shortcodeBuilder.php"; -// } -// -// - //dropdown for shortcode names - echo '
'; - echo ''; - -// /* -// * Member DB Shortcode Attributes -// */ -// - //dropdown for categories - echo ''; -- - // tried calling the adminScripts function here but it throws js errors in the console - wp_enqueue_script('jquery', false, array(), false, true); - wp_enqueue_script('jquery-style', false, array(), false, true); - wp_enqueue_script('jquery-ui-core', false, array(), false, true); - wp_enqueue_script('jquery-ui-widget', false, array(), false, true); - wp_enqueue_script('jquery-ui-dialog', false, array(), false, true); - wp_enqueue_script('jquery-ui-autocomplete', false, array(), false, true); -// // dropdown for blank start - echo ''; - -// // dropdown for views - echo ''; - - // show list options 'scb' = shortcode builder acronym - echo '
'; - echo ''; - echo ''; - foreach($listAttr as $key=>$value){ - if($value != ''){ - echo ''; - } - } - echo '
'; -- - // Jquery DatePicker - wp_enqueue_script('jquery-ui-datepicker'); - wp_enqueue_style('jquery-style', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css'); - // show detail options - echo '
'; - echo ''; - echo ''; - foreach($detailAttr as $key=>$value){ - if($value != ''){ - echo ''; - } - } - echo '
'; - - // packaging addOn mark up - if(file_exists(GLM_MEMBERS_PACKAGING_PLUGIN_PATH . "/setup/shortcodeBuilder.php")){ - include GLM_MEMBERS_PACKAGING_PLUGIN_PATH . "/setup/shortcodeBuilder.php"; - } -- - function custom_js_css() { - // list and detail buttons to open dialog for member db 'show' attr options - echo ''; - echo ''; - wp_enqueue_script('your-meta-box', GLM_MEMBERS_PLUGIN_URL. '/js/shortcodeBuilder.js', array('jquery'), null, true); - echo ''; - } - - add_meta_box("shortcode_builder", - "Shortcode Builder", - array($this,'shortcode_builder_markup'), - "page", 'normal', 'high' - ); - + } - // // 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->wpconfig); - $list = $glmcat->getList(); - // 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){ - if(!is_array($shortCode)){ - $shortCodes[] = $shortCode; - } - } - } - // /* - // * HTML Markup for the shortodes - // */ - // if(file_exists(GLM_MEMBERS_EVENTS_PLUGIN_PATH . "/setup/shortcodeBuilder.php")){ - // include GLM_MEMBERS_EVENTS_PLUGIN_PATH . "/setup/shortcodeBuilder.php"; - // } - // - // - //dropdown for shortcode names - echo '
'; - echo ''; - - // /* - // * Member DB Shortcode Attributes - // */ - // - //dropdown for categories - echo ''; - - // // dropdown for blank start - echo ''; - - // show list options 'scb' = shortcode builder acronym - echo '
'; - echo ''; - echo ''; - foreach($listAttr as $key=>$value){ - if($value != ''){ - echo ''; - } - } - echo '
'; - - // show detail options - echo '
'; - echo ''; - echo ''; - foreach($detailAttr as $key=>$value){ - if($value != ''){ - echo ''; - } - } - echo '
'; - - // packaging addOn mark up - if(file_exists(GLM_MEMBERS_PACKAGING_PLUGIN_PATH . "/setup/shortcodeBuilder.php")){ - include GLM_MEMBERS_PACKAGING_PLUGIN_PATH . "/setup/shortcodeBuilder.php"; - } - - // list and detail buttons to open dialog for member db 'show' attr options - echo ''; - echo ''; - - echo ''; - - } /** * Admin controller @@@ -873,8 -940,8 +619,12 @@@ } } ++ /* ++ * ++ * Check Required Pages ++ * ++ */ foreach ($this->config['addOns'] as $a) { -- // if (isset($a['requiredPages'])) { $this->createPages($a['requiredPages']); } @@@ -940,7 -1007,7 +690,6 @@@ // Create hook to add page tabs by add-on plugins $addOnTabs = array(); -- $addOnTabs = apply_filters( 'glm-member-db-add-tab-for-'.$menuItem, $addOnTabs