Fixed issues with hooksHelp not properly reporting
authorChuck Scott <cscott@gaslightmedia.com>
Fri, 24 Feb 2017 17:00:41 +0000 (12:00 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Fri, 24 Feb 2017 17:00:41 +0000 (12:00 -0500)
Removed sample notice text from defines

defines.php
setup/adminHooks.php
setup/hooksHelp.html

index fe5c84c..fbff7ec 100644 (file)
@@ -5,16 +5,6 @@
  * Set standard defined parameters
  */
 
-/**********************************************************************
- *  NOTE: THIS IS A SOCIAL FILE - DO NOT USE UNMODIFIED
- *
- *  Please change all references to social, Social, or SOCIAL to a name
- *  appropriate for your new Add-On.
- *
- *  Remove this message before using this file in production!
- **********************************************************************/
-
-
 // NOTE: Plugin & Database versions are defined in "/glm-member-db.php".
 
 define('GLM_MEMBERS_SOCIAL_PLUGIN_NAME', 'Gaslight Media Members Database Social (social)');
index 42fba48..da821ac 100644 (file)
  * @link     http://dev.gaslightmedia.com/
  */
 
-/**********************************************************************
- *  NOTE: THIS IS A SOCIAL FILE - DO NOT USE UNMODIFIED
- *
- *  Please change all references to social, Social, or SOCIAL to a name
- *  appropriate for your new Add-On.
- *
- *  This file is used to create hooks into the main plugin or other
- *  add-ons. If no such hooks are needed, this file may be omitted.
- *
- *  Remove this message before using this file in production!
- **********************************************************************/
-
 /*
  * Place Misc Hooks and Filters here. If this file exists, it will be included
  * by the add-on main plugin script.
  *
  *  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_SOCIAL_PLUGIN_PATH.'/setup/hooksHelp.html';
+        if (is_file($fname)) {
+            $hooksHelp = file_get_contents($fname);
+            if ($hooksHelp != false) {
+                $content .= $hooksHelp;
+            }
+        }
+        return $content;
+    },
+    10,
+    2
+);
index 65210d4..175bbe7 100644 (file)
@@ -1,20 +1,5 @@
 <!-- Hooks Help from glm-member-db-social Add-On -->
 
-
-/**********************************************************************
- *  NOTE: THIS IS A SOCIAL FILE - DO NOT USE UNMODIFIED
- *
- *  Please change all references to social, Social, or SOCIAL 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>Social Add-On</p></th></tr>
         
         <tr><th colspan="3">User Permission Hooks</td></tr>