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

index e81f3ea..59c8200 100644 (file)
   */
 
 
+// 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_SERVERSTATS_PLUGIN_PATH.'/setup/hooksHelp.html';
+        if (is_file($fname)) {
+            $hooksHelp = file_get_contents($fname);
+            if ($hooksHelp != false) {
+                $content .= $hooksHelp;
+            }
+        }
+        return $content;
+    },
+    10,
+    2
+);
+
 // Add server stats summary and graphs to main dashboard widget
 add_filter( 'glm-member-db-dashboard-widget-othernotices', function( $content ) {
     $content .= $this->controller('dashboardWidget', 'serverStats', array('location' => 'widget'));
index b7866a4..45c15e8 100644 (file)
@@ -1,2 +1,3 @@
 <!-- Hooks Help from glm-member-db-serverstats Add-On -->
 
+        <tr><th colspan="3" class="glm-notice"><p>Server Stats Add-On</p></th></tr>