Removed test code
authorChuck Scott <cscott@gaslightmedia.com>
Fri, 24 Feb 2017 16:55:15 +0000 (11:55 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Fri, 24 Feb 2017 16:55:15 +0000 (11:55 -0500)
Updated hooksHelp so it works

index.php
models/admin/events/list.php
setup/adminHooks.php
setup/hooksHelp.html

index 73169ae..88df22e 100644 (file)
--- a/index.php
+++ b/index.php
@@ -145,8 +145,6 @@ if (is_file(GLM_MEMBERS_EVENTS_PLUGIN_DB_SCRIPTS.'/dbVersions.php')) {
 }
 
 // Load Events Management Settings data
-/* None - Need to figure out a smooth way to do this.
-*/
 $eventsManagementSettings = $wpdb->get_row( "SELECT * FROM ".GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX."management WHERE id = 1", ARRAY_A );
 unset($eventsManagementSettings['id']);
 
index d2016e9..5b056e1 100644 (file)
@@ -262,7 +262,6 @@ class GlmMembersAdmin_events_list extends GlmDataEvents
                     $amenities = $Amenities->getList(false);
                 }
 
-
                 if ($event['status']) {
                     $haveEvent = true;
                     $eventAdded = true;
@@ -360,6 +359,12 @@ class GlmMembersAdmin_events_list extends GlmDataEvents
                 } else {
                     $option = 'add';
                     $eventAddError = true;
+
+                    // Add any recurrence data that may have been submitted
+//                    if (isset($_REQUEST[''])) {
+//                          NOT COMPLETED
+//                    }
+
                 }
 
                 $view = 'edit';
index b47200a..851a9d0 100644 (file)
  *
  *  Also note that parameters will be in the context of the main admin controller constructor.
  */
+
+// Add hooksHelp.html file to admin Management hooks output
+add_filter('glm-member-db-admin-management-hooksHelp', function($content) {
+
+        // Read in this plugin/addon hook help file
+        $fname = GLM_MEMBERS_EVENTS_PLUGIN_PATH.'/setup/hooksHelp.html';
+        if (is_file($fname)) {
+            $hooksHelp = file_get_contents($fname);
+            if ($hooksHelp != false) {
+                $content .= $hooksHelp;
+            }
+        }
+        return $content;
+    },
+    10,
+    2
+);
+
 add_filter( 'glm-member-db-events-get-events', function( $output ){
     $events = $this->wpdb->get_results(
         "SELECT E.id,E.name,T1.start_time as start
index 1e05ae0..11230f7 100644 (file)
@@ -1,20 +1,5 @@
 <!-- Hooks Help from glm-member-db-events Add-On -->
 
-
-/**********************************************************************
- *  NOTE: THIS IS A EVENTS FILE - DO NOT USE UNMODIFIED
- *
- *  Please change all references to events, Events, or EVENTS to a name
- *  appropriate for your new Add-On.
- *
- *  This file is used to document hooks provided by this add-on. Content
- *  here will be displayed in the "Management" page "Hooks" tab. If 
- *  there is no content for this page, this file should be omitted.
- *
- *  Remove this message before using this file in production!
- **********************************************************************/
-
-
         <tr><th colspan="3" class="glm-notice"><p>Events Add-On</p></th></tr>
         
         <tr><th colspan="3">User Permission Hooks</td></tr>