Added adminHooks and hooksHelp to be consistent with packaging Add-On
authorChuck Scott <cscott@gaslightmedia.com>
Thu, 21 Jan 2016 20:16:20 +0000 (15:16 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Thu, 21 Jan 2016 20:16:20 +0000 (15:16 -0500)
setup/adminHooks.php [new file with mode: 0644]
setup/hooksHelp.html [new file with mode: 0644]

diff --git a/setup/adminHooks.php b/setup/adminHooks.php
new file mode 100644 (file)
index 0000000..4083865
--- /dev/null
@@ -0,0 +1,47 @@
+<?php
+/**
+ * Gaslight Media Members Database
+ * GLM Members Misc Admin Hooks and Filters
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package  glmMembersDatabase
+ * @author   Chuck Scott <cscott@gaslightmedia.com>
+ * @license  http://www.gaslightmedia.com Gaslightmedia
+ * @release  adminHooks.php,v 1.0 2014/10/31 19:31:47 cscott Exp $
+ * @link     http://dev.gaslightmedia.com/
+ */
+
+/*
+ * Place Misc Hooks and Filters here. If this file exists, it will be included
+ * by the add-on main plugin script.
+ *
+ * Note that filter and hook callback functions must be included in-line as shown below...
+ *
+ *  add_filter( 'filter_title', function( $parameter ) {
+ *     // Function code
+ *  });
+ *
+ *  Also note that parameters will be in the context of the main admin controller constructor.
+  */
+
+
+// Add content to member detail page
+add_filter('glm-member-db-admin-management-hoooksHelp', function($content) {
+
+        // Read in this plugin/addon hook help file
+        $fname = GLM_MEMBERS_CONTACTS_PLUGIN_PATH.'/setup/hooksHelp.html';
+        if (is_file($fname)) {
+            $hooksHelp = file_get_contents($fname);
+            if ($hooksHelp != false) {
+                $content .= $hooksHelp;
+            }
+        }
+        return $content;
+    },
+    10,
+    2
+);
+
+?>
\ No newline at end of file
diff --git a/setup/hooksHelp.html b/setup/hooksHelp.html
new file mode 100644 (file)
index 0000000..ce62e67
--- /dev/null
@@ -0,0 +1,38 @@
+<!-- Hooks Help from glm-member-db Plugin -->
+
+        <tr><th colspan="3" class="glm-notice"><p>Contacts Add-On</p></th></tr>
+        
+        <tr><th colspan="3">User Permission Hooks</td></tr>
+        
+        <tr>
+            <td>glm_members_permit_admin_member_contacts_tab</td>
+            <td>Filter</td>
+            <td></td>
+            <td>
+                Hook to test if the logged in user is permitted to see the member Contacts tab.
+            </td>
+        </tr>
+        <tr>
+            <td>glm_members_permit_admin_member_contacts_add_contact</td>
+            <td>Filter</td>
+            <td></td>
+            <td>
+                Hook to test if the logged in user is permitted to add a new contact.
+            </td>
+        </tr>
+        <tr>
+            <td>glm_members_permit_admin_member_contacts_view_contact</td>
+            <td>Filter</td>
+            <td></td>
+            <td>
+                Hook to test if the logged in user is permitted to view a contact.
+            </td>
+        </tr>
+        <tr>
+            <td>glm_members_permit_admin_member_contacts_edit_contact</td>
+            <td>Filter</td>
+            <td></td>
+            <td>
+                Hook to test if the logged in user is permitted to edit a contact.
+            </td>
+        </tr>