Fixed issues with hooksHelp not properly reporting
authorChuck Scott <cscott@gaslightmedia.com>
Fri, 24 Feb 2017 16:57:31 +0000 (11:57 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Fri, 24 Feb 2017 16:57:31 +0000 (11:57 -0500)
setup/adminHooks.php
setup/hooksHelp.html

index 66630a3..e783a91 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_NEARME_PLUGIN_PATH.'/setup/hooksHelp.html';
+        if (is_file($fname)) {
+            $hooksHelp = file_get_contents($fname);
+            if ($hooksHelp != false) {
+                $content .= $hooksHelp;
+            }
+        }
+        return $content;
+    },
+    10,
+    2
+);
+
index bbe0e75..f2a514d 100644 (file)
@@ -1,16 +1,3 @@
-<!-- Hooks Help for {descrName} with Example
+<!-- Hooks Help from glm-member-db-nearme Add-On -->
 
-        <tr><th colspan="3" class="glm-notice"><p>Sample Add-On</p></th></tr>
-        
-        <tr><th colspan="3">User Permission Hooks</td></tr>
-        
-        <tr>
-            <td>some_hook_name</td>
-            <td>FILTER or ACTION</td>
-            <td></td>
-            <td>
-                What this hook does.
-            </td>
-        </tr>
-
--->
\ No newline at end of file
+        <tr><th colspan="3" class="glm-notice"><p>NearMe Add-On</p></th></tr>