Member page creation & management, members only section
authorLaury GvR <laury@gaslightmedia.com>
Wed, 4 May 2016 13:34:36 +0000 (09:34 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Wed, 4 May 2016 13:34:36 +0000 (09:34 -0400)
defines.php
index.php
setup/requiredPages.php

index 49556a5..fa8dc36 100644 (file)
@@ -10,6 +10,7 @@
 define('GLM_MEMBERS_EVENTS_PLUGIN_NAME', 'Gaslight Media Members Database Events (events)');
 define('GLM_MEMBERS_EVENTS_PLUGIN_SHORT_NAME', 'Events');
 define('GLM_MEMBERS_EVENTS_PLUGIN_SLUG', 'glm-member-db-events');
+define('GLM_MEMBERS_EVENTS_PLUGIN_UNDERSCORED_NAME', 'glm_member_db_events');
 
 // Database table prefixes - change if using add-on tables
 global $wpdb;
index af89bc6..89e0cb8 100644 (file)
--- a/index.php
+++ b/index.php
@@ -157,6 +157,7 @@ function glmMembersRegisterEvents($addOns) {
         'name' =>  GLM_MEMBERS_EVENTS_PLUGIN_NAME,
         'short_name' => GLM_MEMBERS_EVENTS_PLUGIN_SHORT_NAME,
         'slug' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
+        'underscored_name' => GLM_MEMBERS_EVENTS_PLUGIN_UNDERSCORED_NAME,
         'actions' => $GLOBALS['glmMembersEventsAddOnValidActions'],
         'config' => array(
             'settings' => $GLOBALS['eventsManagementSettings']
index b49d203..c53458a 100644 (file)
  * Array of required pages
  *
  * This array lists all of the required pages made available to the main
- * member plugin
+ * member plugin, utilised by createPages() in admin.php
  *
  * This array is merged with the data from any registered add-ons
  * providing required pages. The plugin providing the required pages
  * is designated in the 'plugin' elemeent.
+ * 
+ * Leaving 'template' blank will result in index.php default. Any alternative
+ * can be entered, but particularly useful may be 'glm-members-only-template.php'
+ * (providing it exists in the theme!) 
+ * 
+ * Leaving 'parent' blank will set it to 0. A page ID can be used, as well as:
+ * - 'membersonly' : this will make the page a child of the Members Only locked 
+ *                   area
+ * - 'associate'   : this will make the page a child of the GLM Associate page 
+ *                   for management purposes
+ *
+ * When in doubt just use 'associate'
  *
  */
 
 $glmMembersEventsRequiredPages = array(
     'Events List' => array(
+        'name' => 'Events List',
         'content' => '[glm-members-event-list]',
-        'parent' => 'GLM Associate'
+        'parent' => 'associate',
+        'optionSuffix' => 'event_list_id',
     ),
     'Event Detail' => array(
+        'name' => 'Event Detail',
         'content' => '[glm-members-event-detail]',
-        'parent' => 'GLM Associate'
+        'parent' => 'associate',
+        'optionSuffix' => 'event_detail_id',
     )
 );