Update the list model for getting custom field filter working.
authorSteve Sutton <steve@gaslightmedia.com>
Mon, 7 Aug 2017 18:47:20 +0000 (14:47 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 7 Aug 2017 18:47:20 +0000 (14:47 -0400)
Custom field filter for setting the request array up with custom fields
attributes for the member list short code.

models/front/members/list.php
setup/shortcodes.php

index fedb583..2d55a7d 100644 (file)
@@ -208,7 +208,7 @@ class GlmMembersFront_members_list extends GlmDataMemberInfo
             $actionData['request']['region-search'] = $_REQUEST['regionSearch'];
         }
 */
-
+        $actionData = apply_filters( 'glm-member-db-front-search-request', $actionData );
         // Check for "show" shortcode parameter (what elements to show on the page)
         $settings = array();
         $showList = $actionData['request']['show'];
index a15c153..9f862e7 100644 (file)
@@ -75,7 +75,7 @@ if ( isset( $config['settings'] ) && $config['settings']['enable_members'] ) {
             'table'        => GLM_MEMBERS_PLUGIN_DB_PREFIX.'settings_general',
             'cacheControl' => array(
                 'active' => false,
-                'cacheTime' => '2 WEEK'                   // MySQL "DATE_ADD" time interval - see https://www.w3schools.com/sql/func_date_add.asp
+                'cacheTime' => '2 WEEK' // MySQL "DATE_ADD" time interval - see https://www.w3schools.com/sql/func_date_add.asp
             ),
             'attributes'   => array(
                 'type'                  => false,
@@ -187,10 +187,11 @@ if ( isset( $config['settings'] ) && $config['settings']['enable_members'] ) {
             'action'     => 'featured',
             'table'      => GLM_MEMBERS_PLUGIN_DB_PREFIX.'settings_general',
             'attributes' => array (
-                'number'                => 1
+                'number' => 1
             )
         )
     );
+    $glmMembersShortcodes = apply_filters( 'glm-custom-fields-shortcodes', $glmMembersShortcodes );
 
     $glmMembersShortcodesDescription = '
         <tr><th>Shortcode</th><th>Attribute</th><th>Description</th></tr>