From 4c7eb06dbd24ea767e482276268eda18a12fb011 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Fri, 24 Feb 2017 11:59:29 -0500 Subject: [PATCH] Fixed issues with hooksHelp not properly reporting --- setup/adminHooks.php | 17 +++++++++++++++++ setup/hooksHelp.html | 2 ++ 2 files changed, 19 insertions(+) diff --git a/setup/adminHooks.php b/setup/adminHooks.php index 54ce2c3..cbd18d7 100644 --- a/setup/adminHooks.php +++ b/setup/adminHooks.php @@ -26,6 +26,23 @@ * 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_SEARCH_PLUGIN_PATH.'/setup/hooksHelp.html'; + if (is_file($fname)) { + $hooksHelp = file_get_contents($fname); + if ($hooksHelp != false) { + $content .= $hooksHelp; + } + } + return $content; + }, + 10, + 2 +); + // Add warnings to the main dashboard widget by calling model with current controller (admin) add_filter( 'glm-member-db-dashboard-widget-warnings', function( $content ) { $content .= $this->controller('dashboardWidget', 'search'); diff --git a/setup/hooksHelp.html b/setup/hooksHelp.html index bfecadb..7f18905 100644 --- a/setup/hooksHelp.html +++ b/setup/hooksHelp.html @@ -1 +1,3 @@ + +

Search Add-On

-- 2.17.1