Event Calendar WD – Responsive Event Calendar plugin - Version 1.0.65

Version Description

  • Added: Google Maps API Key
Download this release

Release Info

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

Code changes from version 1.0.64 to 1.0.65

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.64
7
  * Author: WebDorado
8
  * Author URI: http://web-dorado.com
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
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.65
7
  * Author: WebDorado
8
  * Author URI: http://web-dorado.com
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
ecwd_admin_class.php CHANGED
@@ -6,7 +6,7 @@
6
  class ECWD_Admin {
7
 
8
  protected static $instance = null;
9
- protected $version = '1.0.64';
10
  protected $ecwd_page = null;
11
  protected $notices = null;
12
 
@@ -333,6 +333,7 @@ class ECWD_Admin {
333
  */
334
  public function enqueue_admin_scripts() {
335
  if ($this->ecwd_page()) {
 
336
 
337
  wp_enqueue_script($this->prefix . '-gmap-public-admin', plugins_url('js/gmap/gmap3.js', __FILE__), array('jquery'), $this->version, true);
338
  wp_enqueue_script($this->prefix . '-admin-datetimepicker', plugins_url('js/admin/jquery.datetimepicker.js', __FILE__), array(
@@ -364,13 +365,17 @@ class ECWD_Admin {
364
  wp_enqueue_style('thickbox');
365
  wp_enqueue_script('thickbox');
366
  }
 
 
 
367
 
368
  wp_localize_script($this->prefix . '-admin-scripts', 'params', $params);
369
  wp_localize_script(ECWD_PLUGIN_PREFIX . '-public', 'ecwd', array(
370
  'ajaxurl' => admin_url('admin-ajax.php'),
371
  'ajaxnonce' => wp_create_nonce(ECWD_PLUGIN_PREFIX . '_ajax_nonce'),
372
  'loadingText' => __('Loading...', 'ecwd'),
373
- 'plugin_url' => ECWD_URL
 
374
  ));
375
 
376
  wp_enqueue_script($this->prefix . '-admin-scripts');
6
  class ECWD_Admin {
7
 
8
  protected static $instance = null;
9
+ protected $version = '1.0.65';
10
  protected $ecwd_page = null;
11
  protected $notices = null;
12
 
333
  */
334
  public function enqueue_admin_scripts() {
335
  if ($this->ecwd_page()) {
336
+ global $ecwd_options;
337
 
338
  wp_enqueue_script($this->prefix . '-gmap-public-admin', plugins_url('js/gmap/gmap3.js', __FILE__), array('jquery'), $this->version, true);
339
  wp_enqueue_script($this->prefix . '-admin-datetimepicker', plugins_url('js/admin/jquery.datetimepicker.js', __FILE__), array(
365
  wp_enqueue_style('thickbox');
366
  wp_enqueue_script('thickbox');
367
  }
368
+
369
+ $gmap_key = (isset($ecwd_options['gmap_key'])) ? $ecwd_options['gmap_key'] : "";
370
+
371
 
372
  wp_localize_script($this->prefix . '-admin-scripts', 'params', $params);
373
  wp_localize_script(ECWD_PLUGIN_PREFIX . '-public', 'ecwd', array(
374
  'ajaxurl' => admin_url('admin-ajax.php'),
375
  'ajaxnonce' => wp_create_nonce(ECWD_PLUGIN_PREFIX . '_ajax_nonce'),
376
  'loadingText' => __('Loading...', 'ecwd'),
377
+ 'plugin_url' => ECWD_URL,
378
+ 'gmap_key' => $gmap_key
379
  ));
380
 
381
  wp_enqueue_script($this->prefix . '-admin-scripts');
ecwd_class.php CHANGED
@@ -6,7 +6,7 @@
6
  */
7
  class ECWD {
8
 
9
- protected $version = '1.0.64';
10
  protected $plugin_name = 'event-calendar-wd';
11
  protected $prefix = 'ecwd';
12
  protected static $instance = null;
@@ -136,7 +136,9 @@ class ECWD {
136
  * Load public facing scripts
137
  */
138
  public function enqueue_scripts() {
139
- global $wp_scripts, $post;
 
 
140
  $map_included = false;
141
  if (is_object($post))
142
  if (isset($post->post_type) && ($post->post_type == 'ecwd_event' || $post->post_type == 'ecwd_venue' || strpos($post->post_content, 'ecwd id') !== false)) {
@@ -152,7 +154,7 @@ class ECWD {
152
  }
153
 
154
  if (!$map_included && false) {
155
- wp_enqueue_script($this->prefix . '-maps-public', 'https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places', array('jquery'), $this->version, false);
156
  }
157
  }
158
 
@@ -169,8 +171,10 @@ class ECWD {
169
  'ajaxnonce' => wp_create_nonce(ECWD_PLUGIN_PREFIX . '_ajax_nonce'),
170
  'loadingText' => __('Loading...', 'ecwd'),
171
  'event_popup_title_text' => __('Event Details','ecwd'),
172
- 'plugin_url' => ECWD_URL
 
173
  ));
 
174
  }
175
 
176
  /*
6
  */
7
  class ECWD {
8
 
9
+ protected $version = '1.0.65';
10
  protected $plugin_name = 'event-calendar-wd';
11
  protected $prefix = 'ecwd';
12
  protected static $instance = null;
136
  * Load public facing scripts
137
  */
138
  public function enqueue_scripts() {
139
+ global $wp_scripts, $post,$ecwd_options;
140
+ $gmap_key = (isset($ecwd_options['gmap_key'])) ? $ecwd_options['gmap_key'] : "";
141
+
142
  $map_included = false;
143
  if (is_object($post))
144
  if (isset($post->post_type) && ($post->post_type == 'ecwd_event' || $post->post_type == 'ecwd_venue' || strpos($post->post_content, 'ecwd id') !== false)) {
154
  }
155
 
156
  if (!$map_included && false) {
157
+ wp_enqueue_script($this->prefix . '-maps-public', 'https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places&key='.$gmap_key, array('jquery'), $this->version, false);
158
  }
159
  }
160
 
171
  'ajaxnonce' => wp_create_nonce(ECWD_PLUGIN_PREFIX . '_ajax_nonce'),
172
  'loadingText' => __('Loading...', 'ecwd'),
173
  'event_popup_title_text' => __('Event Details','ecwd'),
174
+ 'plugin_url' => ECWD_URL,
175
+ 'gmap_key' => $gmap_key
176
  ));
177
+
178
  }
179
 
180
  /*
includes/ecwd-functions.php CHANGED
@@ -5,11 +5,13 @@ function ecwd_print_calendar($calendar_ids, $display = 'mini', $args = array(),
5
  global $ecwd_options;
6
  (isset($ecwd_options['events_in_popup']) && $ecwd_options['events_in_popup'] == "1") ? $popup = "yes" : $popup = "no";
7
  wp_enqueue_script(ECWD_PLUGIN_PREFIX . '-public');
 
8
  wp_localize_script(ECWD_PLUGIN_PREFIX . '-public', 'ecwd', array(
9
  'ajaxurl' => admin_url('admin-ajax.php'),
10
  'ajaxnonce' => wp_create_nonce(ECWD_PLUGIN_PREFIX . '_ajax_nonce'),
11
  'loadingText' => __('Loading...', 'ecwd'),
12
- 'plugin_url' => ECWD_URL
 
13
  ));
14
 
15
  $defaults = array(
5
  global $ecwd_options;
6
  (isset($ecwd_options['events_in_popup']) && $ecwd_options['events_in_popup'] == "1") ? $popup = "yes" : $popup = "no";
7
  wp_enqueue_script(ECWD_PLUGIN_PREFIX . '-public');
8
+ $gmap_key = (isset($ecwd_options['gmap_key'])) ? $ecwd_options['gmap_key'] : "";
9
  wp_localize_script(ECWD_PLUGIN_PREFIX . '-public', 'ecwd', array(
10
  'ajaxurl' => admin_url('admin-ajax.php'),
11
  'ajaxnonce' => wp_create_nonce(ECWD_PLUGIN_PREFIX . '_ajax_nonce'),
12
  'loadingText' => __('Loading...', 'ecwd'),
13
+ 'plugin_url' => ECWD_URL,
14
+ 'gmap_key'=>$gmap_key
15
  ));
16
 
17
  $defaults = array(
includes/register-settings.php CHANGED
@@ -58,6 +58,7 @@ function ecwd_register_settings() {
58
  'general' => 'General',
59
  'category_archive' => 'Category Page',
60
  'custom_css' => 'Custom CSS',
 
61
  'fb' => 'FB settings',
62
  'gcal' => 'Gcal settings',
63
  'ical' => 'Ical settings',
@@ -291,9 +292,71 @@ function ecwd_register_settings() {
291
  'type' => 'textarea',
292
  'cols' => '45',
293
  'rows' => '15'
294
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
295
  )
296
  );
 
297
  if (1 == get_option('ecwd_old_events')) {
298
  $ecwd_settings['general']['show_repeat_rate'] = array(
299
  'id' => 'show_repeat_rate',
@@ -338,8 +401,22 @@ function ecwd_register_settings() {
338
  /* Register all settings or we will get an error when trying to save */
339
  register_setting(ECWD_PLUGIN_PREFIX . '_settings_' . $key, ECWD_PLUGIN_PREFIX . '_settings_' . $key, ECWD_PLUGIN_PREFIX . '_settings_sanitize');
340
  }
341
- }
 
 
 
342
 
 
 
 
 
 
 
 
 
 
 
 
343
  add_action('admin_init', ECWD_PLUGIN_PREFIX . '_register_settings');
344
 
345
  /*
@@ -361,10 +438,12 @@ function ecwd_get_settings_field_args($option, $section) {
361
  'options' => isset($option['options']) ? $option['options'] : '',
362
  'std' => isset($option['std']) ? $option['std'] : '',
363
  'href' => isset($option['href']) ? $option['href'] : '',
 
364
  'default' => isset($option['default']) ? $option['default'] : '',
365
  'cols' => isset($option['cols']) ? $option['cols'] : '',
366
  'rows' => isset($option['rows']) ? $option['rows'] : '',
367
  'labels' => isset($option['labels']) ? $option['labels'] : array(),
 
368
  );
369
 
370
  // Link label to input using 'label_for' argument if text, textarea, password, select, or variations of.
@@ -391,7 +470,11 @@ function ecwd_week_select_callback($args) {
391
  if (!empty($args['desc'])) {
392
  $html .= '<p class="description">' . $args['desc'] . '</p>' . "\n";
393
  }
394
-
 
 
 
 
395
  echo $html;
396
  }
397
 
@@ -412,6 +495,11 @@ function ecwd_time_type_select_callback($args) {
412
  $html .= '<p class="description">' . $args['desc'] . '</p>' . "\n";
413
  }
414
 
 
 
 
 
 
415
  echo $html;
416
  }
417
 
@@ -431,6 +519,11 @@ function ecwd_order_select_callback($args) {
431
  if (!empty($args['desc'])) {
432
  $html .= '<p class="description">' . $args['desc'] . '</p>' . "\n";
433
  }
 
 
 
 
 
434
 
435
  echo $html;
436
  }
@@ -449,6 +542,11 @@ function ecwd_update_select_callback($args) {
449
  if (!empty($args['desc'])) {
450
  $html .= '<p class="description">' . $args['desc'] . '</p>' . "\n";
451
  }
 
 
 
 
 
452
 
453
  echo $html;
454
  }
@@ -465,6 +563,11 @@ function ecwd_status_select_callback($args) {
465
  if (!empty($args['desc'])) {
466
  $html .= '<p class="description">' . $args['desc'] . '</p>' . "\n";
467
  }
 
 
 
 
 
468
 
469
  echo $html;
470
  }
@@ -475,12 +578,19 @@ function ecwd_status_select_callback($args) {
475
 
476
  function ecwd_checkbox_callback($args) {
477
  global $ecwd_options;
 
478
  $checked = isset($ecwd_options[$args['id']]) ? checked(1, $ecwd_options[$args['id']], false) : ( isset($args['default']) ? checked(1, $args['default'], false) : '' );
479
- $html = "\n" . '<div class="checkbox-div"><input type="checkbox" id="ecwd_settings_' . $args['section'] . '[' . $args['id'] . ']" name="ecwd_settings_' . $args['section'] . '[' . $args['id'] . ']" value="1" ' . $checked . '/><label for="ecwd_settings_' . $args['section'] . '[' . $args['id'] . ']"></label></div>' . "\n";
 
480
  // Render description text directly to the right in a label if it exists.
481
  if (!empty($args['desc'])) {
482
  $html .= '<p class="description">' . $args['desc'] . '</p>' . "\n";
483
  }
 
 
 
 
 
484
 
485
  echo $html;
486
  }
@@ -489,7 +599,7 @@ function ecwd_checkbox_callback($args) {
489
  * Radio callback function
490
  */
491
 
492
- function ecwd_radio_callback($args) {
493
  global $ecwd_options;
494
 
495
  $checked_no = isset($ecwd_options[$args['id']]) ? checked(0, $ecwd_options[$args['id']], false) : ( isset($args['default']) ? checked(0, $args['default'], false) : '' );
@@ -503,6 +613,11 @@ function ecwd_radio_callback($args) {
503
  if (!empty($args['desc'])) {
504
  $html .= '<p class="description">' . $args['desc'] . '</p>' . "\n";
505
  }
 
 
 
 
 
506
 
507
  echo $html;
508
  }
@@ -537,6 +652,12 @@ function ecwd_custom_radio_callback($args) {
537
  if (!empty($args['desc'])) {
538
  $html .= '<p class="description">' . $args['desc'] . '</p>' . "\n";
539
  }
 
 
 
 
 
 
540
  echo $html;
541
  }
542
 
@@ -559,6 +680,11 @@ function ecwd_cats_checkbox_callback($args) {
559
  if (!empty($args['desc'])) {
560
  $html .= '<p class="description">' . $args['desc'] . '</p>' . "\n";
561
  }
 
 
 
 
 
562
 
563
  echo $html;
564
  }
@@ -585,6 +711,11 @@ function ecwd_text_callback($args) {
585
  if (!empty($args['desc'])) {
586
  $html .= '<p class="description">' . $args['desc'] . '</p>' . "\n";
587
  }
 
 
 
 
 
588
 
589
  echo $html;
590
  }
@@ -607,6 +738,11 @@ function ecwd_textarea_callback($args) {
607
  if (!empty($args['desc'])) {
608
  $html .= '<p class="description">' . $args['desc'] . '</p>' . "\n";
609
  }
 
 
 
 
 
610
 
611
  echo $html;
612
  }
@@ -622,12 +758,43 @@ function ecwd_link_callback($args) {
622
 
623
  $value = isset($args['name']) ? $args['name'] : '';
624
  $href = isset($args['href']) ? $args['href'] : '#';
625
- $html = "\n" . '<a class="button" href="' . $href . '" id="ecwd_settings_' . $args['section'] . '[' . $args['id'] . ']" >' . esc_attr($value) . '</a>' . "\n";
 
626
  // Render and style description text underneath if it exists.
627
  if (!empty($args['desc'])) {
628
  $html .= '<p class="description">' . $args['desc'] . '</p>' . "\n";
629
  }
 
 
 
 
 
 
 
 
630
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
631
  echo $html;
632
  }
633
 
@@ -660,6 +827,7 @@ function ecwd_get_settings() {
660
  'general' => 'General',
661
  'category_archive' => 'Category Page',
662
  'custom_css' => 'Custom CSS',
 
663
  'fb' => 'FB settings',
664
  'gcal' => 'Gcal settings',
665
  'ical' => 'Ical settings',
58
  'general' => 'General',
59
  'category_archive' => 'Category Page',
60
  'custom_css' => 'Custom CSS',
61
+ 'google_map' => 'Google Map',
62
  'fb' => 'FB settings',
63
  'gcal' => 'Gcal settings',
64
  'ical' => 'Ical settings',
292
  'type' => 'textarea',
293
  'cols' => '45',
294
  'rows' => '15'
295
+ ),
296
+ ),
297
+ 'google_map' => array(
298
+ 'add_project' => array(
299
+ 'id' => 'add_project',
300
+ 'name' => __('Get key', 'ecwd'),
301
+ 'desc' => '',
302
+ 'type' => 'link',
303
+ 'href' => 'https://console.developers.google.com/flows/enableapi?apiid=maps_backend&keyType=CLIENT_SIDE&reusekey=true',
304
+ 'target' => '_blank'
305
+ ),
306
+ 'gmap_key' => array(
307
+ 'id' => 'gmap_key',
308
+ 'name' => __('API key', 'ecwd'),
309
+ 'desc' => '',
310
+ 'type' => 'text',
311
+ )
312
+ )
313
+ );
314
+
315
+
316
+ /*disabled options*/
317
+
318
+ $ecwd_disabled_settings = array(
319
+ /* General Settings */
320
+ 'general' => array(
321
+ 'show_repeat_rate' => array(
322
+ 'id' => 'show_repeat_rate',
323
+ 'name' => __('Show the repeat rate', 'ecwd'),
324
+ 'desc' => __('Check to show the repeat rate in event page .', 'ecwd'),
325
+ 'type' => 'checkbox'
326
+ ),
327
+ 'posterboard_fixed_height' => array(
328
+ 'id' => 'posterboard_fixed_height',
329
+ 'name' => __('Add fixed height for events in posterboard view', 'ecwd'),
330
+ 'desc' => __('', 'ecwd'),
331
+ 'type' => 'radio',
332
+ 'default' => 0
333
+ ),
334
+ 'period_for_list' => array(
335
+ 'id' => 'period_for_list',
336
+ 'name' => __('Period for List view', 'ecwd'),
337
+ 'desc' => __('Period for showing events', 'ecwd'),
338
+ 'size' => 'medium-text',
339
+ 'type' => 'agenda_select'
340
+ ),
341
+ ),
342
+ 'google_map' => array(
343
+ 'gmap_type' => array(
344
+ 'id' => 'gmap_type',
345
+ 'name' => __('Satellite Gmap Type', 'ecwd'),
346
+ 'desc' => '',
347
+ 'type' => 'radio',
348
+ 'default' => 0
349
+ ),
350
+ 'gmap_marker_click' => array(
351
+ 'id' => 'gmap_marker_click',
352
+ 'name' => __('Open Google map when Marker is clicked', 'ecwd'),
353
+ 'desc' => '',
354
+ 'type' => 'radio',
355
+ 'default' => 0
356
+ ),
357
  )
358
  );
359
+
360
  if (1 == get_option('ecwd_old_events')) {
361
  $ecwd_settings['general']['show_repeat_rate'] = array(
362
  'id' => 'show_repeat_rate',
401
  /* Register all settings or we will get an error when trying to save */
402
  register_setting(ECWD_PLUGIN_PREFIX . '_settings_' . $key, ECWD_PLUGIN_PREFIX . '_settings_' . $key, ECWD_PLUGIN_PREFIX . '_settings_sanitize');
403
  }
404
+ foreach ($ecwd_disabled_settings as $key => $settings) {
405
+ add_settings_section(
406
+ ECWD_PLUGIN_PREFIX . '_settings_' . $key, __($ecwd_tabs[$key], 'ecwd'), '__return_false', ECWD_PLUGIN_PREFIX . '_settings_' . $key
407
+ );
408
 
409
+
410
+ foreach ($settings as $option) {
411
+ $option['disabled'] = true;
412
+ add_settings_field(
413
+ ECWD_PLUGIN_PREFIX . '_settings_' . $key . '[' . $option['id'] . ']', $option['name'], function_exists(ECWD_PLUGIN_PREFIX . '_' . $option['type'] . '_callback') ? ECWD_PLUGIN_PREFIX . '_' . $option['type'] . '_callback' : ECWD_PLUGIN_PREFIX . '_missing_callback', ECWD_PLUGIN_PREFIX . '_settings_' . $key, ECWD_PLUGIN_PREFIX . '_settings_' . $key, ecwd_get_settings_field_args($option, $key)
414
+ );
415
+ }
416
+ /* Register all settings or we will get an error when trying to save */
417
+ //register_setting(ECWD_PLUGIN_PREFIX . '_settings_' . $key, ECWD_PLUGIN_PREFIX . '_settings_' . $key, ECWD_PLUGIN_PREFIX . '_settings_sanitize');
418
+ }
419
+ }
420
  add_action('admin_init', ECWD_PLUGIN_PREFIX . '_register_settings');
421
 
422
  /*
438
  'options' => isset($option['options']) ? $option['options'] : '',
439
  'std' => isset($option['std']) ? $option['std'] : '',
440
  'href' => isset($option['href']) ? $option['href'] : '',
441
+ 'target' => isset($option['target']) ? $option['target'] : '',
442
  'default' => isset($option['default']) ? $option['default'] : '',
443
  'cols' => isset($option['cols']) ? $option['cols'] : '',
444
  'rows' => isset($option['rows']) ? $option['rows'] : '',
445
  'labels' => isset($option['labels']) ? $option['labels'] : array(),
446
+ 'disabled' => isset($option['disabled']) ? $option['disabled'] : false,
447
  );
448
 
449
  // Link label to input using 'label_for' argument if text, textarea, password, select, or variations of.
470
  if (!empty($args['desc'])) {
471
  $html .= '<p class="description">' . $args['desc'] . '</p>' . "\n";
472
  }
473
+
474
+ if($args['disabled']){
475
+ $html .= '<p class="ecwd_disabled_text">This option is disabled in free version.</p>';
476
+ $html .= '<input type="hidden" value="1" class="ecwd_disabled_option" />';
477
+ }
478
  echo $html;
479
  }
480
 
495
  $html .= '<p class="description">' . $args['desc'] . '</p>' . "\n";
496
  }
497
 
498
+ if($args['disabled']){
499
+ $html .= '<p class="ecwd_disabled_text">This option is disabled in free version.</p>';
500
+ $html .= '<input type="hidden" value="1" class="ecwd_disabled_option" />';
501
+ }
502
+
503
  echo $html;
504
  }
505
 
519
  if (!empty($args['desc'])) {
520
  $html .= '<p class="description">' . $args['desc'] . '</p>' . "\n";
521
  }
522
+
523
+ if($args['disabled']){
524
+ $html .= '<p class="ecwd_disabled_text">This option is disabled in free version.</p>';
525
+ $html .= '<input type="hidden" value="1" class="ecwd_disabled_option" />';
526
+ }
527
 
528
  echo $html;
529
  }
542
  if (!empty($args['desc'])) {
543
  $html .= '<p class="description">' . $args['desc'] . '</p>' . "\n";
544
  }
545
+
546
+ if($args['disabled']){
547
+ $html .= '<p class="ecwd_disabled_text">This option is disabled in free version.</p>';
548
+ $html .= '<input type="hidden" value="1" class="ecwd_disabled_option" />';
549
+ }
550
 
551
  echo $html;
552
  }
563
  if (!empty($args['desc'])) {
564
  $html .= '<p class="description">' . $args['desc'] . '</p>' . "\n";
565
  }
566
+
567
+ if($args['disabled']){
568
+ $html .= '<p class="ecwd_disabled_text">This option is disabled in free version.</p>';
569
+ $html .= '<input type="hidden" value="1" class="ecwd_disabled_option" />';
570
+ }
571
 
572
  echo $html;
573
  }
578
 
579
  function ecwd_checkbox_callback($args) {
580
  global $ecwd_options;
581
+
582
  $checked = isset($ecwd_options[$args['id']]) ? checked(1, $ecwd_options[$args['id']], false) : ( isset($args['default']) ? checked(1, $args['default'], false) : '' );
583
+ $id = 'ecwd_settings_' . $args['section'] . '[' . $args['id'] . ']';
584
+ $html = "\n" . '<div class="checkbox-div"><input type="checkbox" id="'.$id.'" name="ecwd_settings_' . $args['section'] . '[' . $args['id'] . ']" value="1" ' . $checked . '/><label for="ecwd_settings_' . $args['section'] . '[' . $args['id'] . ']"></label></div>' . "\n";
585
  // Render description text directly to the right in a label if it exists.
586
  if (!empty($args['desc'])) {
587
  $html .= '<p class="description">' . $args['desc'] . '</p>' . "\n";
588
  }
589
+
590
+ if($args['disabled']){
591
+ $html .= '<p class="ecwd_disabled_text">This option is disabled in free version.</p>';
592
+ $html .= '<input type="hidden" value="1" class="ecwd_disabled_option" />';
593
+ }
594
 
595
  echo $html;
596
  }
599
  * Radio callback function
600
  */
601
 
602
+ function ecwd_radio_callback($args) {
603
  global $ecwd_options;
604
 
605
  $checked_no = isset($ecwd_options[$args['id']]) ? checked(0, $ecwd_options[$args['id']], false) : ( isset($args['default']) ? checked(0, $args['default'], false) : '' );
613
  if (!empty($args['desc'])) {
614
  $html .= '<p class="description">' . $args['desc'] . '</p>' . "\n";
615
  }
616
+
617
+ if($args['disabled']){
618
+ $html .= '<p class="ecwd_disabled_text">This option is disabled in free version.</p>';
619
+ $html .= '<input type="hidden" value="1" class="ecwd_disabled_option" />';
620
+ }
621
 
622
  echo $html;
623
  }
652
  if (!empty($args['desc'])) {
653
  $html .= '<p class="description">' . $args['desc'] . '</p>' . "\n";
654
  }
655
+
656
+ if($args['disabled']){
657
+ $html .= '<p class="ecwd_disabled_text">This option is disabled in free version.</p>';
658
+ $html .= '<input type="hidden" value="1" class="ecwd_disabled_option" />';
659
+ }
660
+
661
  echo $html;
662
  }
663
 
680
  if (!empty($args['desc'])) {
681
  $html .= '<p class="description">' . $args['desc'] . '</p>' . "\n";
682
  }
683
+
684
+ if($args['disabled']){
685
+ $html .= '<p class="ecwd_disabled_text">This option is disabled in free version.</p>';
686
+ $html .= '<input type="hidden" value="1" class="ecwd_disabled_option" />';
687
+ }
688
 
689
  echo $html;
690
  }
711
  if (!empty($args['desc'])) {
712
  $html .= '<p class="description">' . $args['desc'] . '</p>' . "\n";
713
  }
714
+
715
+ if($args['disabled']){
716
+ $html .= '<p class="ecwd_disabled_text">This option is disabled in free version.</p>';
717
+ $html .= '<input type="hidden" value="1" class="ecwd_disabled_option" />';
718
+ }
719
 
720
  echo $html;
721
  }
738
  if (!empty($args['desc'])) {
739
  $html .= '<p class="description">' . $args['desc'] . '</p>' . "\n";
740
  }
741
+
742
+ if($args['disabled']){
743
+ $html .= '<p class="ecwd_disabled_text">This option is disabled in free version.</p>';
744
+ $html .= '<input type="hidden" value="1" class="ecwd_disabled_option" />';
745
+ }
746
 
747
  echo $html;
748
  }
758
 
759
  $value = isset($args['name']) ? $args['name'] : '';
760
  $href = isset($args['href']) ? $args['href'] : '#';
761
+ $target = isset($args['target']) ? $args['target'] : '';
762
+ $html = "\n" . '<a target="'.$target.'" class="button" href="' . $href . '" id="ecwd_settings_' . $args['section'] . '[' . $args['id'] . ']" >' . esc_attr($value) . '</a>' . "\n";
763
  // Render and style description text underneath if it exists.
764
  if (!empty($args['desc'])) {
765
  $html .= '<p class="description">' . $args['desc'] . '</p>' . "\n";
766
  }
767
+
768
+ if($args['disabled']){
769
+ $html .= '<p class="ecwd_disabled_text">This option is disabled in free version.</p>';
770
+ $html .= '<input type="hidden" value="1" class="ecwd_disabled_option" />';
771
+ }
772
+
773
+ echo $html;
774
+ }
775
 
776
+ function ecwd_agenda_select_callback($args) {
777
+ global $ecwd_options;
778
+ $html = "\n" . '<select id="ecwd_settings_' . $args['section'] . '[' . $args['id'] . ']" name="ecwd_settings_' . $args['section'] . '[' . $args['id'] . ']" >
779
+ <option value="1" ' . selected(1, isset($ecwd_options[$args['id']]) ? $ecwd_options[$args['id']] : '', false) . '>1 month</option>
780
+ <option value="2" ' . selected(2, isset($ecwd_options[$args['id']]) ? $ecwd_options[$args['id']] : '', false) . '>2 months</option>
781
+ <option value="3" ' . selected(3, isset($ecwd_options[$args['id']]) ? $ecwd_options[$args['id']] : '', false) . '>3 months</option>
782
+ <option value="4" ' . selected(4, isset($ecwd_options[$args['id']]) ? $ecwd_options[$args['id']] : '', false) . '>4 months</option>
783
+ <option value="5" ' . selected(5, isset($ecwd_options[$args['id']]) ? $ecwd_options[$args['id']] : '', false) . '>5 months</option>
784
+ <option value="6" ' . selected(6, isset($ecwd_options[$args['id']]) ? $ecwd_options[$args['id']] : '', false) . '>6 months</option>
785
+ <option value="12" ' . selected(12, isset($ecwd_options[$args['id']]) ? $ecwd_options[$args['id']] : '', false) . '>1 year</option>
786
+ </select>' . "\n";
787
+
788
+ // Render description text directly to the right in a label if it exists.
789
+ if (!empty($args['desc'])) {
790
+ $html .= '<p class="description">' . $args['desc'] . '</p>' . "\n";
791
+ }
792
+
793
+ if($args['disabled']){
794
+ $html .= '<p class="ecwd_disabled_text">This option is disabled in free version.</p>';
795
+ $html .= '<input type="hidden" value="1" class="ecwd_disabled_option" />';
796
+ }
797
+
798
  echo $html;
799
  }
800
 
827
  'general' => 'General',
828
  'category_archive' => 'Category Page',
829
  'custom_css' => 'Custom CSS',
830
+ 'google_map' => 'Google Map',
831
  'fb' => 'FB settings',
832
  'gcal' => 'Gcal settings',
833
  'ical' => 'Ical settings',
js/admin/admin.js CHANGED
@@ -384,7 +384,25 @@
384
  title: 'Calendar',
385
  body_class: "ecwd-modal",
386
  container_class:'ecwd_preview_calendar'
387
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
388
  }(jQuery));
389
 
390
  var map;
@@ -561,10 +579,10 @@ function updateMarkerAddress(address){
561
 
562
  }
563
 
564
- function loadScript() {
565
  var script = document.createElement('script');
566
  script.type = 'text/javascript';
567
  script.src = 'https://maps.googleapis.com/maps/api/js?v=3.exp&key=AIzaSyCIUXhK7om6EZ9Ca5xFcEbXMKEQZz7U2kM' +
568
- '&callback=initialize&libraries=places';
569
  document.body.appendChild(script);
570
  }
384
  title: 'Calendar',
385
  body_class: "ecwd-modal",
386
  container_class:'ecwd_preview_calendar'
387
+ });
388
+
389
+ if($("#ecwd-settings-content").length == 1){
390
+ var color = "rgba(51,51,51,.5)";
391
+ $('.ecwd_disabled_option').each(function(){
392
+ $(this).closest("tr").find("th").css("color",color);
393
+
394
+ $(this).closest("td").find("select").attr("disabled",true);
395
+ $(this).closest("td").find("input").attr("disabled",true);
396
+
397
+ $(this).closest("td").find("select").attr("name",'');
398
+ $(this).closest("td").find("input").attr("name",'');
399
+
400
+ $(this).closest("td").find("label").css("color",color);
401
+ $(this).closest("td").find(".description").css("color",color);
402
+ $(this).closest("td").find(".ecwd_disabled_text").css("color",color);
403
+ });
404
+ }
405
+
406
  }(jQuery));
407
 
408
  var map;
579
 
580
  }
581
 
582
+ function loadScript() {
583
  var script = document.createElement('script');
584
  script.type = 'text/javascript';
585
  script.src = 'https://maps.googleapis.com/maps/api/js?v=3.exp&key=AIzaSyCIUXhK7om6EZ9Ca5xFcEbXMKEQZz7U2kM' +
586
+ '&callback=initialize&libraries=places&key='+ecwd.gmap_key;
587
  document.body.appendChild(script);
588
  }
js/scripts.js CHANGED
@@ -641,13 +641,12 @@ if (typeof ecwd_js_init != "function")
641
  }
642
  }
643
 
644
- }
645
-
646
- this.showMap = function () {
647
  if (typeof google == 'undefined' || typeof google.maps == "undefined") {
648
  var script = document.createElement('script');
649
- script.type = 'text/javascript';
650
- script.src = 'https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&callback=ecwd_js_init_call.showMap';
651
  document.body.appendChild(script);
652
  } else {
653
  var maps = [];
641
  }
642
  }
643
 
644
+ }
645
+ this.showMap = function () {
 
646
  if (typeof google == 'undefined' || typeof google.maps == "undefined") {
647
  var script = document.createElement('script');
648
+ script.type = 'text/javascript';
649
+ script.src = 'https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&callback=ecwd_js_init_call.showMap&key='+ecwd.gmap_key;
650
  document.body.appendChild(script);
651
  } else {
652
  var maps = [];
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
- === Calendar ===
2
  Contributors: webdorado
3
  Donate link: https://web-dorado.com/products/wordpress-event-calendar-wd.html
4
- Tags: calendar, calendars, event, event calendar, event manager, events calendar, calendar widget, event registration, event management,events, agenda, holiday calendar , scheduling, free calendar, Calender, upcoming events , event widget , event list, calendar localization, Organizer, editorial calendar, Interactive Calendar, news calendar, meeting , appointment, event tracking, event organizer, upcoming events widget, event page, event bookings, recurring, recurring events, conference, date, dates, schedule, times, venue, AJAX, responsive, shortcode, seminar, summit, facebook integration, widget, reservation
5
  Requires at least: 3.9
6
  Tested up to: 4.5
7
- Stable tag: 1.0.64
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.64 =
159
  * Fixed: Translations
160
  * Changed: Open Google map when Marker is clicked option
1
+ === Calendar Event WD ===
2
  Contributors: webdorado
3
  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.5
7
+ Stable tag: 1.0.65
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.65 =
159
+ * Added: Google Maps API Key
160
+
161
  = 1.0.64 =
162
  * Fixed: Translations
163
  * Changed: Open Google map when Marker is clicked option