Minor addition to admin css file for use in certain admin areas.
authorChuck Scott <cscott@gaslightmedia.com>
Thu, 14 Sep 2017 13:57:58 +0000 (09:57 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Thu, 14 Sep 2017 14:05:23 +0000 (10:05 -0400)
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.

controllers/admin.php
controllers/front.php
css/admin.css
lib/GlmDataAbstract/documentation.odt
setup/commonHooks.php [new file with mode: 0644]

index 84b1454..0940f8f 100644 (file)
@@ -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;
             }
 
         }
index 3eb19ab..6283f68 100644 (file)
@@ -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;
             }
 
         }
index 52c17a5..826c6af 100644 (file)
@@ -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;
 }
index a018732..3812a5e 100644 (file)
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 (file)
index 0000000..76c044a
--- /dev/null
@@ -0,0 +1,29 @@
+<?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.
+  */
+