From: Steve Sutton Date: Wed, 8 Nov 2017 16:44:01 +0000 (-0500) Subject: Add new shortcode attribute for event list. X-Git-Tag: v1.6.72^2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=cddd44c6f9e3c836b9c2794f63633affa69c473d;p=WP-Plugins%2Fglm-member-db-events.git Add new shortcode attribute for event list. 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.:< --- diff --git a/index.php b/index.php index ce1fffa..22f3799 100644 --- 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 * @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. diff --git a/models/front/events/list.php b/models/front/events/list.php index 13a0b60..923181d 100644 --- a/models/front/events/list.php +++ b/models/front/events/list.php @@ -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 ) ) { diff --git a/setup/shortcodes.php b/setup/shortcodes.php index 8b00846..ec0f7be 100644 --- a/setup/shortcodes.php +++ b/setup/shortcodes.php @@ -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 = ' The "pageslug" attribute sets the event detail page name. Default is event-detail. + + +   + + show_all_in_agenda="{ True/False }" + + + The "show_all_in_agenda" attribute sets the end date search to empty value so it will get all events in Agenda view. + [glm-members-event-detail]