Added check for "setup/commonHooks.php" to provide hooks that are used by both admin and front processes. Sample file in main plugin.
Removed check for "setup/mapHooks.php" which didn't seem to be in use. Can't find any "mapHooks.php" files in any of our plugins.
*/
foreach ($this->config['addOns'] as $a) {
- // If setup/frontMisc.php exists include that now - Can be used for additional filters and hooks
- $miscFile = GLM_MEMBERS_WORDPRESS_PLUGIN_PATH.$a['slug'].'/setup/adminHooks.php';
- if (is_file($miscFile)) {
- require_once $miscFile;
+ // If setup/adminHooks.php exists include that now - Can be used for additional filters and hooks
+ $hooksFile = GLM_MEMBERS_WORDPRESS_PLUGIN_PATH.$a['slug'].'/setup/adminHooks.php';
+ if (is_file($hooksFile)) {
+ require_once $hooksFile;
+ }
+
+ // If setup/commonHooks.php exists include that now - Can be used for additional filters and hooks
+ $commonFile = GLM_MEMBERS_WORDPRESS_PLUGIN_PATH.$a['slug'].'/setup/commonHooks.php';
+ if (is_file($commonFile)) {
+ require_once $commonFile;
}
}
*/
foreach ($this->config['addOns'] as $a) {
- // If setup/frontMisc.php exists include that now - Can be used for additional filters and hooks
- $miscFile = GLM_MEMBERS_WORDPRESS_PLUGIN_PATH.$a['slug'].'/setup/frontHooks.php';
- if (is_file($miscFile)) {
- require_once $miscFile;
+ // If setup/frontHooks.php exists include that now - Can be used for additional filters and hooks
+ $hooksFile = GLM_MEMBERS_WORDPRESS_PLUGIN_PATH.$a['slug'].'/setup/frontHooks.php';
+ if (is_file($hooksFile)) {
+ require_once $hooksFile;
}
- // Check for a mapHooks.php file - Maps various add_filters to apply_filters for the add-on
- $mapHooksFile = GLM_MEMBERS_WORDPRESS_PLUGIN_PATH.$a['slug'].'/setup/mapHooks.php';
- if (is_file($mapHooksFile)) {
- require_once $mapHooksFile;
+ // Check for a commonHooks.php file - Maps various add_filters to apply_filters for the add-on
+ $commonFile = GLM_MEMBERS_WORDPRESS_PLUGIN_PATH.$a['slug'].'/setup/commonHooks.php';
+ if (is_file($commonFile)) {
+ require_once $commonFile;
}
}
color: red !important;
white-space: nowrap;
}
+.glm-nowrap-left-align {
+ white-space: nowrap;
+ text-align: left;
+ vertical-align: top;
+}
+.glm-required-nowrap-left-align {
+ color: red !important;
+ white-space: nowrap;
+ text-align: left;
+ vertical-align: top;
+}
.glm-hidden {
display: none !important;
}
--- /dev/null
+<?php
+/**
+ * Gaslight Media Members Database
+ * GLM Members Misc Common Hooks and Filters
+ * Called by both Admin and Front controllers
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package glmMembersDatabase
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release commonHooks.php,v 1.0 2014/10/31 19:31:47 cscott Exp $
+ * @link http://dev.gaslightmedia.com/
+ */
+
+/*
+ * Place Misc Hooks and Filters that should be available to both admin and front processes here.
+ * If this file exists, it will be included by the main plugin script.
+ *
+ * Note that filter and hook callback functions must be included in-line as shown below...
+ *
+ * add_filter( 'filter_title', function( $parameter ) {
+ * // Function code
+ * });
+ *
+ * Also note that parameters will be in the context of the main admin controller constructor.
+ */
+