From: Chuck Scott Date: Fri, 24 Feb 2017 17:00:41 +0000 (-0500) Subject: Fixed issues with hooksHelp not properly reporting X-Git-Tag: v1.1.0^2~11 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=92bff3722e41052ad4642144bf5ba0d307873656;p=WP-Plugins%2Fglm-member-db-social.git Fixed issues with hooksHelp not properly reporting Removed sample notice text from defines --- diff --git a/defines.php b/defines.php index fe5c84c..fbff7ec 100644 --- a/defines.php +++ b/defines.php @@ -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)'); diff --git a/setup/adminHooks.php b/setup/adminHooks.php index 42fba48..da821ac 100644 --- a/setup/adminHooks.php +++ b/setup/adminHooks.php @@ -13,18 +13,6 @@ * @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. @@ -37,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_SOCIAL_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 65210d4..175bbe7 100644 --- a/setup/hooksHelp.html +++ b/setup/hooksHelp.html @@ -1,20 +1,5 @@ - -/********************************************************************** - * 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! - **********************************************************************/ - -

Social Add-On

User Permission Hooks