Fixed hook name conflicts between customfields and old fields plugins.
authorChuck Scott <cscott@gaslightmedia.com>
Fri, 15 Dec 2017 16:48:23 +0000 (11:48 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Fri, 15 Dec 2017 16:48:23 +0000 (11:48 -0500)
setup/adminHooks.php
setup/commonHooks.php
setup/hooksHelp.html
setup/shortcodes.php
views/admin/customFields/index.html

index e4ba99d..8b07856 100644 (file)
@@ -51,13 +51,8 @@ add_filter('glm-member-db-admin-management-hooksHelp', function($content) {
  * {use} can be a description of the use or where it used (i.e. "reg-event-edit")
  * {id} should be an ID of the record these fields are associated with, for example a registration event ID
  */
-add_filter( 'glm-members-customfields-edit', function( $content, $fid ){
+add_filter( 'glm-members-customfields-form-edit', function( $content, $fid ){
     unset( $_REQUEST['glm_action'] );
     $content .= $this->controller( 'customFields', 'index', array( 'fid' => $fid ), true );
     return $content;
 }, 10, 2 );
-
-
-
-
-
index 593c1d8..8924960 100644 (file)
@@ -60,9 +60,9 @@
  * FID to reference other data.
  *
  * These are the hooks provided in this file. Also look at the adminHooks.php file for the
- * glm-members-customfields-edit hook used to create and edit groups of custom form fields.
+ * glm-members-customfields-form-edit hook used to create and edit groups of custom form fields.
  *
- * glm-members-customfields-active            Is the add-on installed and active
+ * glm-members-customfields-plugin-active     Is the add-on installed and active
  * glm-members-customfields-have-fields       Does a particular FID exist (has fields)
  * glm-members-customfields-form-display      Display a particular form by FID
  * glm-members-customfields-form-submit       Submit data for a particular FID and optionally store it
@@ -75,7 +75,7 @@
 /**
  * Filter will return true if the plugin is active.
  */
-add_filter( 'glm-members-customfields-active', function( $active ){
+add_filter( 'glm-members-customfields-plugin-active', function( $active ){
     return true;
 }, 10, 1 );
 
index 332f20e..03308dd 100644 (file)
@@ -18,7 +18,7 @@
 <tr><th colspan="3" class="glm-notice"><p>Custom Fields Add-On</p></th></tr>
 <tr><th colspan="3">Menu/Tab Hooks</th></tr>
 <tr>
-    <td>glm-members-customfields-active</td>
+    <td>glm-members-customfields-plugin-active</td>
     <td>FILTER</td>
     <td></td>
     <td>
@@ -42,7 +42,7 @@
 </tr>
 <tr><th colspan="3">Fields Add/Delete/Edit</th></tr>
 <tr>
-    <td>glm-members-customfields-edit</td>
+    <td>glm-members-customfields-form-edit</td>
     <td>FILTER</td>
     <td>$content, $fid</td>
     <td>
index 5510a26..c2581b6 100644 (file)
@@ -126,7 +126,7 @@ $glmMembersCustomFieldsShortcodesDescription = '
     <th>fid="{Form ID String}"</th>
     <td>
         The "fid" attribute is the Form ID string that is unique to the
-        custom form created using admin "glm-members-customfields-edit" filter.
+        custom form created using admin "glm-members-customfields-form-edit" filter.
         <p>
             The standard for this for ID is "{add-on-slug}-customfields-{descr-slug}-{optional-id}.<br>
             where:<br>
index 79f2118..cf5d703 100644 (file)
 {* Fields Table *}
 <table class="" style="width: 100%; background-color: #fff; border: 1px solid black; l">
         <tr style="background-color: #ddd;">
-            <th>Field Name</th>
-            <th>Type</th>
-            <th>Required</th>
-            <th width="10%">
+            <th style="text-align: left;">Field Name</th>
+            <th style="text-align: left;">Type</th>
+            <th style="text-align: left;">Required</th>
+            <th style="text-align: left;" width="10%">
                 <div id="{$fid}_newFieldButton" class="button button-primary glm-button-small">Add a Custom Field</div>
                 &nbsp;
             </th>
 {if $haveCustomFields}
   {foreach $custom_fields as $t}
         <tr class="FieldRow_{$t.id}">
-            <th style="font-weight: bold;">{$t.field_name}</th>
-            <td id="editFieldType_{$t.id}">
+            <th style="font-weight: bold; text-align: left;">{$t.field_name}</th>
+            <td style="text-align: left;" id="editFieldType_{$t.id}">
                 {$t.field_type_descr}
             </td>
-            <td>
+            <td style="text-align: left;">
                 {$t.required.name}
             </td>
-            <td style="width: 10%;">
+            <td style="width: 10%; text-align: left;">
 <!--                <div class="{$fid}_EditFieldButton  button button-secondary glm-button-small" data-fieldId="{$t.id}" data-fieldName="{$t.field_name|escape:'html'}" data-fieldPrompt="{$t.field_prompt|escape:'html'}" data-fieldType="{$t.field_type.name|escape:'html'}" data-required="{$t.required.value}">Edit</div>
  -->                 
                 <div class="{$fid}_DeleteFieldButton button button-secondary glm-button-small" data-fieldId="{$t.id}">Delete</div>