Event Calendar WD – Responsive Event Calendar plugin - Version 1.0.86

Version Description

  • Added: "Do not show past events" option
Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 Event Calendar WD – Responsive Event Calendar plugin
Version 1.0.86
Comparing to
See all releases

Code changes from version 1.0.85 to 1.0.86

ecwd.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Event Calendar WD
4
  * Plugin URI: https://web-dorado.com/products/wordpress-event-calendar-wd.html
5
  * Description: Event Calendar WD is an easy event management and planning tool with advanced features.
6
- * Version: 1.0.85
7
  * Author: WebDorado
8
  * Author URI: http://web-dorado.com
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -22,7 +22,7 @@ if( ! defined( 'ECWD_MAIN_FILE' ) ) {
22
  }
23
 
24
  if(! defined( 'ECWD_VERSION' ) ){
25
- define ('ECWD_VERSION',"1.0.85");
26
  }
27
 
28
  add_action( 'plugins_loaded', array( 'ECWD', 'get_instance' ) );
3
  * Plugin Name: Event Calendar WD
4
  * Plugin URI: https://web-dorado.com/products/wordpress-event-calendar-wd.html
5
  * Description: Event Calendar WD is an easy event management and planning tool with advanced features.
6
+ * Version: 1.0.86
7
  * Author: WebDorado
8
  * Author URI: http://web-dorado.com
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
22
  }
23
 
24
  if(! defined( 'ECWD_VERSION' ) ){
25
+ define ('ECWD_VERSION',"1.0.86");
26
  }
27
 
28
  add_action( 'plugins_loaded', array( 'ECWD', 'get_instance' ) );
ecwd_admin_class.php CHANGED
@@ -6,7 +6,7 @@
6
  class ECWD_Admin {
7
 
8
  protected static $instance = null;
9
- protected $version = '1.0.85';
10
  protected $ecwd_page = null;
11
  protected $notices = null;
12
 
6
  class ECWD_Admin {
7
 
8
  protected static $instance = null;
9
+ protected $version = '1.0.86';
10
  protected $ecwd_page = null;
11
  protected $notices = null;
12
 
ecwd_class.php CHANGED
@@ -6,7 +6,7 @@
6
  */
7
  class ECWD {
8
 
9
- protected $version = '1.0.85';
10
  protected $plugin_name = 'event-calendar-wd';
11
  protected $prefix = 'ecwd';
12
  protected static $instance = null;
6
  */
7
  class ECWD {
8
 
9
+ protected $version = '1.0.86';
10
  protected $plugin_name = 'event-calendar-wd';
11
  protected $prefix = 'ecwd';
12
  protected static $instance = null;
includes/ecwd-display-class.php CHANGED
@@ -231,6 +231,7 @@ class ECWD_Display {
231
  global $ecwd_options;
232
  $event_desc_length = isset($ecwd_options['event_description_max_length']) ? $ecwd_options['event_description_max_length'] : "";
233
 
 
234
  foreach ($ecwd_events as $ecwd_event) {
235
 
236
  $term_metas = '';
@@ -270,11 +271,30 @@ class ECWD_Display {
270
  } else {
271
  $event_calendar_ids = $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_calendars'][0];
272
  }
273
- //var_dump($term_metas);
274
  if (in_array($this->id[0], $event_calendar_ids)) {
275
- $events[$ecwd_event->ID] = new ECWD_Event($ecwd_event->ID, $id, $ecwd_event->post_title, $ecwd_event->post_content, $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'][0], $permalink, $ecwd_event, $term_metas, $ecwd_event_metas);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
276
  }
277
  }
 
 
278
  }
279
  $this->merged_events += $google_events + $facebook_events + $ical_events + $events;
280
 
231
  global $ecwd_options;
232
  $event_desc_length = isset($ecwd_options['event_description_max_length']) ? $ecwd_options['event_description_max_length'] : "";
233
 
234
+ $hide_old_events = (isset($ecwd_options['hide_old_events']) && $ecwd_options['hide_old_events'] == '1');
235
  foreach ($ecwd_events as $ecwd_event) {
236
 
237
  $term_metas = '';
271
  } else {
272
  $event_calendar_ids = $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_calendars'][0];
273
  }
274
+
275
  if (in_array($this->id[0], $event_calendar_ids)) {
276
+ if($hide_old_events === false){
277
+ $events[$ecwd_event->ID] = new ECWD_Event($ecwd_event->ID, $id, $ecwd_event->post_title, $ecwd_event->post_content, $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'][0], $permalink, $ecwd_event, $term_metas, $ecwd_event_metas);
278
+ }else{
279
+
280
+ if (strtotime($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'][0]) >= strtotime(date("Y-m-d 00:00:00"))) {
281
+ $events[$ecwd_event->ID] = new ECWD_Event($ecwd_event->ID, $id, $ecwd_event->post_title, $ecwd_event->post_content, $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'][0], $permalink, $ecwd_event, $term_metas, $ecwd_event_metas);
282
+ }
283
+
284
+
285
+ // if (isset($ecwd_event_metas['ecwd_all_day_event'][0]) && $ecwd_event_metas['ecwd_all_day_event'][0] == "1") {
286
+ // if (strtotime($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'][0]) >= strtotime(date("Y-m-d"))) {
287
+ // $events[$ecwd_event->ID] = new ECWD_Event($ecwd_event->ID, $id, $ecwd_event->post_title, $ecwd_event->post_content, $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'][0], $permalink, $ecwd_event, $term_metas, $ecwd_event_metas);
288
+ // }
289
+ // } else {
290
+ // if (strtotime($ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'][0]) >= strtotime(date("Y-m-d H:i:s"))) {
291
+ // $events[$ecwd_event->ID] = new ECWD_Event($ecwd_event->ID, $id, $ecwd_event->post_title, $ecwd_event->post_content, $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_location'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_from'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_date_to'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_event_url'][0], $ecwd_event_metas[ECWD_PLUGIN_PREFIX . '_lat_long'][0], $permalink, $ecwd_event, $term_metas, $ecwd_event_metas);
292
+ // }
293
+ // }
294
  }
295
  }
296
+
297
+ }
298
  }
299
  $this->merged_events += $google_events + $facebook_events + $ical_events + $events;
300
 
includes/register-settings.php CHANGED
@@ -282,6 +282,13 @@ function ecwd_register_settings() {
282
  'type' => 'radio',
283
  'default' => 1
284
  ),
 
 
 
 
 
 
 
285
  ),
286
  'category_archive' => array(
287
  'category_archive_slug' => array(
282
  'type' => 'radio',
283
  'default' => 1
284
  ),
285
+ 'hide_old_events' => array(
286
+ 'id' => 'hide_old_events',
287
+ 'name' => __('Do not show past events', 'ecwd'),
288
+ 'desc' => '',
289
+ 'type' => 'radio',
290
+ 'default' => 0
291
+ ),
292
  ),
293
  'category_archive' => array(
294
  'category_archive_slug' => array(
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-event-calendar-wd.html
4
  Tags: calendar, date, event, event calendar, events, events calendar, meeting, organizer, recurring, reservation, responsive, schedule
5
  Requires at least: 3.9
6
  Tested up to: 4.7
7
- Stable tag: 1.0.85
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -155,6 +155,9 @@ After downloading the ZIP file of the Event Calendar WD plugin,
155
 
156
  == Changelog ==
157
 
 
 
 
158
  = 1.0.85 =
159
  * Fixed: Minor bug
160
  * Fixed: Bug on day view
4
  Tags: calendar, date, event, event calendar, events, events calendar, meeting, organizer, recurring, reservation, responsive, schedule
5
  Requires at least: 3.9
6
  Tested up to: 4.7
7
+ Stable tag: 1.0.86
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
155
 
156
  == Changelog ==
157
 
158
+ = 1.0.86 =
159
+ * Added: "Do not show past events" option
160
+
161
  = 1.0.85 =
162
  * Fixed: Minor bug
163
  * Fixed: Bug on day view