Event Calendar WD – Responsive Event Calendar plugin - Version 1.0.74

Version Description

Changed: Organizers, venues cache
Fixed: Venue edit in event
Fixed: Gmap js issue

Download this release

Release Info

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

Code changes from version 1.0.73 to 1.0.74

css/style.css CHANGED
@@ -2694,4 +2694,8 @@ table.ecwd_calendar_container > tbody > tr >td{
2694
  }
2695
  .ecwd_open_event_popup{
2696
  cursor: pointer;
 
 
 
 
2697
  }
2694
  }
2695
  .ecwd_open_event_popup{
2696
  cursor: pointer;
2697
+ }
2698
+
2699
+ .ecwd_map_div, .ecwd_map_div span{
2700
+ color:black;
2701
  }
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.73
7
  * Author: WebDorado
8
  * Author URI: http://web-dorado.com
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -21,6 +21,10 @@ if( ! defined( 'ECWD_MAIN_FILE' ) ) {
21
  define ('ECWD_URL',plugins_url(plugin_basename(dirname(__FILE__))));
22
  }
23
 
 
 
 
 
24
  add_action( 'plugins_loaded', array( 'ECWD', 'get_instance' ) );
25
 
26
  if ( is_admin() ) {
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.74
7
  * Author: WebDorado
8
  * Author URI: http://web-dorado.com
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
21
  define ('ECWD_URL',plugins_url(plugin_basename(dirname(__FILE__))));
22
  }
23
 
24
+ if(! defined( 'ECWD_VERSION' ) ){
25
+ define ('ECWD_VERSION',"1.0.74");
26
+ }
27
+
28
  add_action( 'plugins_loaded', array( 'ECWD', 'get_instance' ) );
29
 
30
  if ( is_admin() ) {
ecwd_admin_class.php CHANGED
@@ -6,7 +6,7 @@
6
  class ECWD_Admin {
7
 
8
  protected static $instance = null;
9
- protected $version = '1.0.73';
10
  protected $ecwd_page = null;
11
  protected $notices = null;
12
 
@@ -29,7 +29,11 @@ class ECWD_Admin {
29
  add_action('admin_enqueue_scripts', array($this, 'enqueue_admin_scripts'));
30
 
31
  // Add the options page and menu item.
32
- add_action('admin_menu', array($this, 'add_plugin_admin_menu'), 2);
 
 
 
 
33
  foreach (array('post.php', 'post-new.php') as $hook) {
34
  add_action("admin_head-$hook", array($this, 'admin_head'));
35
  }
@@ -80,8 +84,41 @@ class ECWD_Admin {
80
  include_once ECWD_DIR . '/includes/ecwd_config.php';
81
  $conf = ECWD_Config::get_instance();
82
  $conf->update_conf_file();
 
 
 
 
83
  }
84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  public static function uninstall() {
86
 
87
  }
@@ -94,7 +131,23 @@ class ECWD_Admin {
94
  'display_admin_page'
95
  )
96
  );
97
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
 
99
  $this->ecwd_page[] = add_submenu_page(
100
  'edit.php?post_type=ecwd_calendar', __('Licensing', 'ecwd'), __('Licensing', 'ecwd'), 'manage_options', $this->prefix . '_licensing', array(
6
  class ECWD_Admin {
7
 
8
  protected static $instance = null;
9
+ protected $version = '1.0.74';
10
  protected $ecwd_page = null;
11
  protected $notices = null;
12
 
29
  add_action('admin_enqueue_scripts', array($this, 'enqueue_admin_scripts'));
30
 
31
  // Add the options page and menu item.
32
+ add_action('admin_menu', array($this, 'add_plugin_admin_menu'), 10);
33
+ // add_action('admin_menu', array($this, 'check_for_update'), 25);
34
+ // add_action('admin_menu', array($this, 'featured_plugins'), 30);
35
+ // add_filter('parent_file', array($this,'ecwd_set_current_menu'));
36
+
37
  foreach (array('post.php', 'post-new.php') as $hook) {
38
  add_action("admin_head-$hook", array($this, 'admin_head'));
39
  }
84
  include_once ECWD_DIR . '/includes/ecwd_config.php';
85
  $conf = ECWD_Config::get_instance();
86
  $conf->update_conf_file();
87
+ if (get_option("ecwd_version") == false) {
88
+ self::fix_events_locations();
89
+ update_option('ecwd_version', ECWD_VERSION);
90
+ }
91
  }
92
 
93
+ static function fix_events_locations(){
94
+ $venue_cache = array();
95
+ $args = array(
96
+ 'numberposts' => -1,
97
+ 'post_type' => 'ecwd_event'
98
+ );
99
+ $events = get_posts($args);
100
+ if(empty($events)){
101
+ return;
102
+ }
103
+
104
+ foreach ($events as $event) {
105
+ $venue_id = intval(get_post_meta($event->ID,'ecwd_event_venue',true));
106
+ if(empty($venue_id)){
107
+ continue;
108
+ }
109
+
110
+ if(!isset($venue_cache[$venue_id])){
111
+ $venue_cache[$venue_id] = array(
112
+ 'ecwd_venue_location' => get_post_meta($venue_id,'ecwd_venue_location',true),
113
+ 'ecwd_venue_lat_long' => get_post_meta($venue_id,'ecwd_venue_lat_long',true)
114
+ );
115
+ }
116
+ update_post_meta($event->ID,'ecwd_event_location',$venue_cache[$venue_id]['ecwd_venue_location']);
117
+ update_post_meta($event->ID,'ecwd_lat_long',$venue_cache[$venue_id]['ecwd_venue_lat_long']);
118
+ }
119
+
120
+ }
121
+
122
  public static function uninstall() {
123
 
124
  }
131
  'display_admin_page'
132
  )
133
  );
134
+ // $this->ecwd_page[] = add_submenu_page(
135
+ // 'edit.php?post_type=ecwd_calendar',
136
+ // __('Event Categories', 'ecwd'),
137
+ // __('Event Categories', 'ecwd'),
138
+ // 'manage_options',
139
+ // 'edit-tags.php?taxonomy=ecwd_event_category&post_type=ecwd_event',
140
+ // null
141
+ // );
142
+ //
143
+ // $this->ecwd_page[] = add_submenu_page(
144
+ // 'edit.php?post_type=ecwd_calendar',
145
+ // __('Event Tags', 'ecwd'),
146
+ // __('Event Tags', 'ecwd'),
147
+ // 'manage_options',
148
+ // 'edit-tags.php?taxonomy=ecwd_event_tag&post_type=ecwd_event',
149
+ // null
150
+ // );
151
 
152
  $this->ecwd_page[] = add_submenu_page(
153
  'edit.php?post_type=ecwd_calendar', __('Licensing', 'ecwd'), __('Licensing', 'ecwd'), 'manage_options', $this->prefix . '_licensing', array(
ecwd_class.php CHANGED
@@ -6,7 +6,7 @@
6
  */
7
  class ECWD {
8
 
9
- protected $version = '1.0.73';
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.74';
10
  protected $plugin_name = 'event-calendar-wd';
11
  protected $prefix = 'ecwd';
12
  protected static $instance = null;
includes/ecwd-cpt-class.php CHANGED
@@ -92,6 +92,30 @@ class ECWD_Cpt {
92
  add_filter('init', array($this, 'event_restrict_manage'));
93
  add_action('the_title', array($this, 'is_events_list_page_title'), 11, 2);
94
  add_action('after_setup_theme', array($this, 'add_thumbnails_for_themes'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  }
96
 
97
  public function add_thumbnails_for_themes() {
@@ -248,7 +272,7 @@ class ECWD_Cpt {
248
  'new_item' => __('New Calendar', 'ecwd'),
249
  'edit_item' => __('Edit Calendar', 'ecwd'),
250
  'view_item' => __('View Calendar', 'ecwd'),
251
- 'all_items' => __('All Calendars', 'ecwd'),
252
  'search_items' => __('Search Calendar', 'ecwd'),
253
  'not_found' => __('No Calendars found.', 'ecwd'),
254
  'not_found_in_trash' => __('No Calendars found in Trash.', 'ecwd')
@@ -1073,7 +1097,7 @@ class ECWD_Cpt {
1073
  }
1074
  }
1075
 
1076
-
1077
  return $post_id;
1078
  }
1079
 
92
  add_filter('init', array($this, 'event_restrict_manage'));
93
  add_action('the_title', array($this, 'is_events_list_page_title'), 11, 2);
94
  add_action('after_setup_theme', array($this, 'add_thumbnails_for_themes'));
95
+ add_action('ecwd_venue_after_save_meta',array($this,'change_events_locations'));
96
+
97
+ }
98
+
99
+ public function change_events_locations($venue_id) {
100
+ $venue_location = (isset($_POST['ecwd_venue_location'])) ? $_POST['ecwd_venue_location'] : "";
101
+ $venue_lat_long = (isset($_POST['ecwd_venue_lat_long']) && !empty($venue_location)) ? $_POST['ecwd_venue_lat_long'] : "";
102
+
103
+ $args = array(
104
+ 'numberposts' => '-1',
105
+ 'post_type' => 'ecwd_event',
106
+ 'meta_key' => 'ecwd_event_venue',
107
+ 'meta_value' => $venue_id
108
+ );
109
+ $events = get_posts($args);
110
+ if (empty($events)) {
111
+ return false;
112
+ }
113
+
114
+ foreach ($events as $event) {
115
+ update_post_meta($event->ID, 'ecwd_event_location', $venue_location);
116
+ update_post_meta($event->ID, 'ecwd_lat_long', $venue_lat_long);
117
+ }
118
+
119
  }
120
 
121
  public function add_thumbnails_for_themes() {
272
  'new_item' => __('New Calendar', 'ecwd'),
273
  'edit_item' => __('Edit Calendar', 'ecwd'),
274
  'view_item' => __('View Calendar', 'ecwd'),
275
+ 'all_items' => __('Calendars', 'ecwd'),
276
  'search_items' => __('Search Calendar', 'ecwd'),
277
  'not_found' => __('No Calendars found.', 'ecwd'),
278
  'not_found_in_trash' => __('No Calendars found in Trash.', 'ecwd')
1097
  }
1098
  }
1099
 
1100
+ do_action($post_type.'_after_save_meta',$post_id);
1101
  return $post_id;
1102
  }
1103
 
js/admin/admin.js CHANGED
@@ -70,7 +70,7 @@
70
  if($("#ecwd_event_repeat_year_on_days_2").prop('checked')){
71
  $(".ecwd_event_repeat_on_the").attr('disabled', true);
72
  $(".select_to_enable_disable").attr('disabled', false);
73
- $(".#ecwd_event_year_month").attr('disabled', true);
74
  }
75
  $(".ecwd_event_repeat_list_radio").click(function () {
76
  $(".ecwd_event_repeat_on_the").attr('disabled', true);
@@ -409,15 +409,21 @@ var map;
409
  var markers = [];
410
  var geocoder;
411
 
 
 
 
 
 
 
412
  function initialize() {
413
  geocoder = new google.maps.Geocoder();
414
 
415
  var lat_long = document.getElementById('ecwd_lat_long').value.split(',');
416
  var lat_long_available = false;
417
- if(lat_long[0]) {
418
  var myLatlng = new google.maps.LatLng(parseFloat(lat_long[0]), parseFloat(lat_long[1]));
419
  lat_long_available = true;
420
- }else{
421
  var myLatlng = new google.maps.LatLng(53.65914, 0.072050);
422
  }
423
  var ecwd_zoom = parseInt(document.getElementById('ecwd_map_zoom').value);
@@ -459,7 +465,9 @@ function initialize() {
459
  google.maps.event.addListener(autocomplete, 'place_changed', function () {
460
  infowindow.close();
461
  address_marker.setVisible(false);
462
-
 
 
463
  var place = autocomplete.getPlace();
464
  if (!place.geometry) {
465
  return;
@@ -497,17 +505,22 @@ function initialize() {
497
  infowindow.open(map, address_marker);
498
  });
499
 
500
- google.maps.event.addListener(map, 'click', function(event) {
501
  deleteMarkers();
502
  geocodePosition(event.latLng);
503
  addMarker(event.latLng);
 
 
 
504
  });
505
  google.maps.event.addListener(address_marker, 'dragend', function () {
506
  setMarkerPosition(address_marker);
507
  geocodePosition(address_marker.getPosition());
508
-
 
 
509
  });
510
- google.maps.event.addListener(map, 'zoom_changed', function() {
511
  jQuery('#ecwd_map_zoom').val(map.getZoom());
512
  });
513
 
@@ -517,6 +530,41 @@ function initialize() {
517
  var loc = document.getElementById('ecwd_event_location').value;
518
 
519
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
520
 
521
  }
522
 
@@ -532,7 +580,10 @@ function addMarker(location) {
532
  google.maps.event.addListener(marker,'dragend',function(event) {
533
  setMarkerPosition(marker);
534
  geocodePosition(marker.getPosition());
535
-
 
 
 
536
  });
537
  }
538
 
70
  if($("#ecwd_event_repeat_year_on_days_2").prop('checked')){
71
  $(".ecwd_event_repeat_on_the").attr('disabled', true);
72
  $(".select_to_enable_disable").attr('disabled', false);
73
+ $(".ecwd_event_year_month").attr('disabled', true);
74
  }
75
  $(".ecwd_event_repeat_list_radio").click(function () {
76
  $(".ecwd_event_repeat_on_the").attr('disabled', true);
409
  var markers = [];
410
  var geocoder;
411
 
412
+ var change_event_location_obj = null;
413
+ if(jQuery('#ecwd_event_location').length > 0){
414
+ change_event_location_obj = new change_event_location();
415
+ change_event_location_obj.change_location();
416
+ }
417
+
418
  function initialize() {
419
  geocoder = new google.maps.Geocoder();
420
 
421
  var lat_long = document.getElementById('ecwd_lat_long').value.split(',');
422
  var lat_long_available = false;
423
+ if (lat_long[0]) {
424
  var myLatlng = new google.maps.LatLng(parseFloat(lat_long[0]), parseFloat(lat_long[1]));
425
  lat_long_available = true;
426
+ } else {
427
  var myLatlng = new google.maps.LatLng(53.65914, 0.072050);
428
  }
429
  var ecwd_zoom = parseInt(document.getElementById('ecwd_map_zoom').value);
465
  google.maps.event.addListener(autocomplete, 'place_changed', function () {
466
  infowindow.close();
467
  address_marker.setVisible(false);
468
+ if (change_event_location_obj !== null) {
469
+ change_event_location_obj.is_changed_event_location();
470
+ }
471
  var place = autocomplete.getPlace();
472
  if (!place.geometry) {
473
  return;
505
  infowindow.open(map, address_marker);
506
  });
507
 
508
+ google.maps.event.addListener(map, 'click', function (event) {
509
  deleteMarkers();
510
  geocodePosition(event.latLng);
511
  addMarker(event.latLng);
512
+ if (change_event_location_obj !== null) {
513
+ change_event_location_obj.is_changed_event_location();
514
+ }
515
  });
516
  google.maps.event.addListener(address_marker, 'dragend', function () {
517
  setMarkerPosition(address_marker);
518
  geocodePosition(address_marker.getPosition());
519
+ if (change_event_location_obj !== null) {
520
+ change_event_location_obj.is_changed_event_location();
521
+ }
522
  });
523
+ google.maps.event.addListener(map, 'zoom_changed', function () {
524
  jQuery('#ecwd_map_zoom').val(map.getZoom());
525
  });
526
 
530
  var loc = document.getElementById('ecwd_event_location').value;
531
 
532
  }
533
+ }
534
+ /*IN EVENT META PAGE*/
535
+ function change_event_location() {
536
+ this.$venue_list = jQuery('#ecwd_event_venue');
537
+ this.$event_location_fild = jQuery('#ecwd_event_location');
538
+ this.event_location = '';
539
+ this.replace = false;
540
+
541
+ this.reset_venue_list = function () {
542
+ this.$venue_list.val('0');
543
+ };
544
+
545
+ this.is_changed_event_location = function () {
546
+ var val1 = this.$event_location_fild.val().replace(/\s+$/g, '');
547
+ var val2 = this.event_location.replace(/\s+$/g, '');
548
+ console.log(val1)
549
+ console.log(val2)
550
+ if (val1 !== val2 || this.replace === true) {
551
+ this.reset_venue_list();
552
+ this.set_event_location();
553
+ this.replace = false;
554
+ }
555
+ };
556
+
557
+ this.change_location = function(){
558
+ var _this = this;
559
+ _this.event_location = jQuery('#ecwd_event_location').val();
560
+ jQuery(document).on('input', '#ecwd_event_location', function () {
561
+ _this.is_changed_event_location();
562
+ });
563
+ }
564
+
565
+ this.set_event_location = function(){
566
+ this.event_location = this.$event_location_fild.val();
567
+ }
568
 
569
  }
570
 
580
  google.maps.event.addListener(marker,'dragend',function(event) {
581
  setMarkerPosition(marker);
582
  geocodePosition(marker.getPosition());
583
+ var venue_list = jQuery('#ecwd_event_venue');
584
+ if(venue_list.length > 0){
585
+ venue_list.val('0');
586
+ }
587
  });
588
  }
589
 
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.6
7
- Stable tag: 1.0.73
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -155,6 +155,11 @@ After downloading the ZIP file of the Event Calendar WD plugin,
155
 
156
  == Changelog ==
157
 
 
 
 
 
 
158
  = 1.0.73 =
159
  * Changed: Settings structure
160
  * Fixed: Minor bug
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.6
7
+ Stable tag: 1.0.74
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.74 =
159
+ Changed: Organizers, venues cache
160
+ Fixed: Venue edit in event
161
+ Fixed: Gmap js issue
162
+
163
  = 1.0.73 =
164
  * Changed: Settings structure
165
  * Fixed: Minor bug