Add new shortcode attribute for event list.
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 8 Nov 2017 16:44:01 +0000 (11:44 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 8 Nov 2017 16:44:01 +0000 (11:44 -0500)
Adding an attribute "show_all_in_agend".
When set to True it will empty the to date in search and list out all
current events in the agenda view.:<

index.php
models/front/events/list.php
setup/shortcodes.php

index ce1fffa..22f3799 100644 (file)
--- a/index.php
+++ b/index.php
@@ -4,7 +4,7 @@
  * Plugin URI: http://www.gaslightmedia.com/
  * Description: Gaslight Media Members Database.
 
- * Version: 1.6.71
+ * Version: 1.6.72
 
  * Author: Chuck Scott
  * Author URI: http://www.gaslightmedia.com/
@@ -22,7 +22,7 @@
  * @author Chuck Scott <cscott@gaslightmedia.com>
  * @license http://www.gaslightmedia.com Gaslightmedia
 
- * @version 1.6.71
+ * @version 1.6.72
 
  */
 
@@ -47,7 +47,7 @@ if (!defined('ABSPATH')) {
  *  so that we're sure the other add-ons see an up to date
  *  version from this plugin.
  */
-define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.6.71');
+define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.6.72');
 define('GLM_MEMBERS_EVENTS_PLUGIN_DB_VERSION', '0.1.4');
 
 // This is the minimum version of the GLM Members DB plugin require for this plugin.
index 13a0b60..923181d 100644 (file)
@@ -231,7 +231,10 @@ class GlmMembersFront_events_list extends GlmMembersFront_events_baseAction
                     $_REQUEST['glm_event_to']   = $toDate;
                 }
             }
-        } else if ( in_array($action, array( 'event-list-name', 'nameSearch', 'featured' ) ) || $this->config['settings']['use_venue_locations'] ) {
+        } else if ( in_array($action, array( 'event-list-name', 'nameSearch', 'featured' ) )
+            || $this->config['settings']['use_venue_locations']
+            || filter_var( $actionData['request']['show_all_in_agenda'], FILTER_VALIDATE_BOOLEAN )
+        ) {
             $toDate = null;
         } else {
             if ( isset($_REQUEST['t']) && $t = filter_var( $_REQUEST['t'], FILTER_SANITIZE_STRING ) ) {
index 8b00846..ec0f7be 100644 (file)
@@ -110,6 +110,7 @@ $glmMembersEventsShortcodes = array(
             'pageslug'     => null,
             'group_by_day' => true,
             'group_month'  => false,
+            'show_all_in_agenda' => false,
         )
     ),
     'glm-members-event-detail' => array(
@@ -204,6 +205,15 @@ $glmMembersEventsShortcodesDescription = '
         <td>
         The "pageslug" attribute sets the event detail page name. Default is event-detail.
         </td>
+    </tr>
+    <tr>
+        <td>&nbsp;</td>
+        <th>
+            show_all_in_agenda="{ True/False }"
+        </th>
+        <td>
+        The "show_all_in_agenda" attribute sets the end date search to empty value so it will get all events in Agenda view.
+        </td>
     </tr>
      <tr>
         <th>[glm-members-event-detail]</th>