Added hooks help file support to adminHooks.php
authorChuck Scott <cscott@gaslightmedia.com>
Fri, 24 Feb 2017 16:20:29 +0000 (11:20 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Fri, 24 Feb 2017 16:20:58 +0000 (11:20 -0500)
setup/adminHooks.php

index e0ca786..99ec215 100644 (file)
  *
  *  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-hooksHelp', function($content) {
+
+        // Read in this plugin/addon hook help file
+        $fname = {definedPrefix}_PLUGIN_PATH.'/setup/hooksHelp.html';
+        if (is_file($fname)) {
+            $hooksHelp = file_get_contents($fname);
+            if ($hooksHelp != false) {
+                $content .= $hooksHelp;
+            }
+        }
+        return $content;
+    },
+    10,
+    2
+);