From 3bb12beb785974fbc7fad47aad54e9d3aa038257 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Fri, 24 Feb 2017 11:57:31 -0500 Subject: [PATCH] Fixed issues with hooksHelp not properly reporting --- setup/adminHooks.php | 18 ++++++++++++++++++ setup/hooksHelp.html | 17 ++--------------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/setup/adminHooks.php b/setup/adminHooks.php index 66630a3..e783a91 100644 --- a/setup/adminHooks.php +++ b/setup/adminHooks.php @@ -25,3 +25,21 @@ * * 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 +); + diff --git a/setup/hooksHelp.html b/setup/hooksHelp.html index bbe0e75..f2a514d 100644 --- a/setup/hooksHelp.html +++ b/setup/hooksHelp.html @@ -1,16 +1,3 @@ - -

Sample Add-On

- - User Permission Hooks - - - some_hook_name - FILTER or ACTION - - - What this hook does. - - - ---> \ No newline at end of file +

NearMe Add-On

-- 2.17.1