From: Chuck Scott Date: Thu, 14 Sep 2017 13:57:58 +0000 (-0400) Subject: Minor addition to admin css file for use in certain admin areas. X-Git-Tag: v2.10.11^2~4 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=9aa86c8bb6b2d829f59fcfc4786f180530f207dc;p=WP-Plugins%2Fglm-member-db.git Minor addition to admin css file for use in certain admin areas. 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. --- diff --git a/controllers/admin.php b/controllers/admin.php index 84b1454d..0940f8f8 100644 --- a/controllers/admin.php +++ b/controllers/admin.php @@ -216,10 +216,16 @@ class glmMembersAdmin extends GlmPluginSupport */ 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; } } diff --git a/controllers/front.php b/controllers/front.php index 3eb19ab1..6283f683 100644 --- a/controllers/front.php +++ b/controllers/front.php @@ -80,16 +80,16 @@ class glmMembersFront extends GlmPluginSupport */ 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; } } diff --git a/css/admin.css b/css/admin.css index 52c17a56..826c6af4 100644 --- a/css/admin.css +++ b/css/admin.css @@ -60,6 +60,17 @@ input, select, .button { 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; } diff --git a/lib/GlmDataAbstract/documentation.odt b/lib/GlmDataAbstract/documentation.odt index a018732d..3812a5e6 100644 Binary files a/lib/GlmDataAbstract/documentation.odt and b/lib/GlmDataAbstract/documentation.odt differ diff --git a/setup/commonHooks.php b/setup/commonHooks.php new file mode 100644 index 00000000..76c044a9 --- /dev/null +++ b/setup/commonHooks.php @@ -0,0 +1,29 @@ + + * @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. + */ +