Version Description
- Fixed: Calendar search
Download this release
Release Info
| Developer | webdorado |
| Plugin | |
| Version | 1.0.83 |
| Comparing to | |
| See all releases | |
Code changes from version 1.0.82 to 1.0.83
- ecwd.php +2 -2
- ecwd_admin_class.php +1 -1
- ecwd_class.php +1 -1
- includes/calendar-class.php +3 -0
- includes/ecwd-display-class.php +64 -3
- js/scripts.js +4 -3
- readme.txt +5 -2
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.
|
| 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.
|
| 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.83
|
| 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.83");
|
| 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.
|
| 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.83';
|
| 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.
|
| 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.83';
|
| 10 |
protected $plugin_name = 'event-calendar-wd';
|
| 11 |
protected $prefix = 'ecwd';
|
| 12 |
protected static $instance = null;
|
includes/calendar-class.php
CHANGED
|
@@ -600,6 +600,9 @@
|
|
| 600 |
$html .= ' </div>
|
| 601 |
</div>';
|
| 602 |
$html .= $this->cal_next(); // next month link
|
|
|
|
|
|
|
|
|
|
| 603 |
$html .= '</div>';
|
| 604 |
$html .= $this->cal_viewmode();
|
| 605 |
if (!in_array($this->displaytype, array(
|
| 600 |
$html .= ' </div>
|
| 601 |
</div>';
|
| 602 |
$html .= $this->cal_next(); // next month link
|
| 603 |
+
$current_date_link = "?date=" . $this->year . "-" . $this->month . "-" . $this->day;
|
| 604 |
+
$current_date_link .= "&t=" . $this->displaytype;
|
| 605 |
+
$html .= '<input type="hidden" class="ecwd_current_link" value="' . $current_date_link . '" />';
|
| 606 |
$html .= '</div>';
|
| 607 |
$html .= $this->cal_viewmode();
|
| 608 |
if (!in_array($this->displaytype, array(
|
includes/ecwd-display-class.php
CHANGED
|
@@ -280,9 +280,11 @@ class ECWD_Display {
|
|
| 280 |
|
| 281 |
//$this->merged_events += $events;
|
| 282 |
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
|
|
|
|
|
|
| 286 |
}
|
| 287 |
}
|
| 288 |
|
|
@@ -663,6 +665,62 @@ class ECWD_Display {
|
|
| 663 |
}
|
| 664 |
}
|
| 665 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 666 |
/**
|
| 667 |
* Returns array of days with events, with sub-arrays of events for that day
|
| 668 |
*/
|
|
@@ -1160,6 +1218,9 @@ class ECWD_Display {
|
|
| 1160 |
* Return the calendar
|
| 1161 |
*/
|
| 1162 |
public function get_view($date = '', $type = '', $widget = 0, $ecwd_views, $preview) {
|
|
|
|
|
|
|
|
|
|
| 1163 |
require_once 'calendar-class.php';
|
| 1164 |
$categories = get_categories(array('taxonomy' => ECWD_PLUGIN_PREFIX . '_event_category'));
|
| 1165 |
$tags = get_terms('ecwd_event_tag', array('hide_empty' => false));
|
| 280 |
|
| 281 |
//$this->merged_events += $events;
|
| 282 |
|
| 283 |
+
if(isset($_REQUEST['ecwd_calendar_search']) && $_REQUEST['ecwd_calendar_search'] == '1'){
|
| 284 |
+
$this->get_search_events_for_long_days();
|
| 285 |
+
}else {
|
| 286 |
+
$this->get_events_for_long_days('', 1);
|
| 287 |
+
}
|
| 288 |
}
|
| 289 |
}
|
| 290 |
|
| 665 |
}
|
| 666 |
}
|
| 667 |
|
| 668 |
+
private function get_search_events_for_long_days(){
|
| 669 |
+
$this->get_events_for_long_days('', 1);
|
| 670 |
+
|
| 671 |
+
if(empty($this->merged_events) || (is_array($this->events) && !empty($this->events))){
|
| 672 |
+
return ;
|
| 673 |
+
}
|
| 674 |
+
|
| 675 |
+
$max_end_date = 0;
|
| 676 |
+
$max_end_date_event_id = 0;
|
| 677 |
+
|
| 678 |
+
foreach ($this->merged_events as $id=>$event) {
|
| 679 |
+
|
| 680 |
+
if(isset($event->metas['ecwd_event_repeat_repeat_until'][0])){
|
| 681 |
+
$temp_date = $event->metas['ecwd_event_repeat_repeat_until'][0];
|
| 682 |
+
}else{
|
| 683 |
+
$temp_date = $event->end_time;
|
| 684 |
+
}
|
| 685 |
+
|
| 686 |
+
$temp_date = strtotime($temp_date);
|
| 687 |
+
|
| 688 |
+
if($temp_date > $max_end_date){
|
| 689 |
+
$max_end_date = $temp_date;
|
| 690 |
+
$max_end_date_event_id = $id;
|
| 691 |
+
}
|
| 692 |
+
}
|
| 693 |
+
|
| 694 |
+
$max_end_date = strtotime(date("Y/m/t H:i:s", $max_end_date));
|
| 695 |
+
|
| 696 |
+
|
| 697 |
+
$init_start_date = $this->start_date;
|
| 698 |
+
$init_end_date = $this->end_date;
|
| 699 |
+
|
| 700 |
+
while(true){
|
| 701 |
+
|
| 702 |
+
$start_date = date("Y-n-j" ,strtotime("+1 MONTH", strtotime($this->start_date)));
|
| 703 |
+
$end_date = date("Y-m-t" , strtotime($start_date));
|
| 704 |
+
|
| 705 |
+
if(strtotime($end_date) > $max_end_date){
|
| 706 |
+
$this->start_date = $init_start_date;
|
| 707 |
+
$this->end_date = $init_end_date;
|
| 708 |
+
break;
|
| 709 |
+
}
|
| 710 |
+
|
| 711 |
+
|
| 712 |
+
$this->start_date = $start_date;
|
| 713 |
+
$this->end_date = $end_date;
|
| 714 |
+
|
| 715 |
+
$this->get_events_for_long_days('', 1);
|
| 716 |
+
|
| 717 |
+
|
| 718 |
+
if(is_array($this->events) && !empty($this->events)){
|
| 719 |
+
break;
|
| 720 |
+
}
|
| 721 |
+
}
|
| 722 |
+
}
|
| 723 |
+
|
| 724 |
/**
|
| 725 |
* Returns array of days with events, with sub-arrays of events for that day
|
| 726 |
*/
|
| 1218 |
* Return the calendar
|
| 1219 |
*/
|
| 1220 |
public function get_view($date = '', $type = '', $widget = 0, $ecwd_views, $preview) {
|
| 1221 |
+
if(!empty($this->start_date)){
|
| 1222 |
+
$date = $this->start_date;
|
| 1223 |
+
}
|
| 1224 |
require_once 'calendar-class.php';
|
| 1225 |
$categories = get_categories(array('taxonomy' => ECWD_PLUGIN_PREFIX . '_event_category'));
|
| 1226 |
$tags = get_terms('ecwd_event_tag', array('hide_empty' => false));
|
js/scripts.js
CHANGED
|
@@ -181,7 +181,7 @@ if (typeof ecwd_js_init != "function")
|
|
| 181 |
function doSearch(el) {
|
| 182 |
|
| 183 |
var main_div = jQuery(el).closest('.calendar_main');
|
| 184 |
-
var navLink = jQuery(main_div).find('.
|
| 185 |
var query = jQuery(main_div).find('input.ecwd-search').val();
|
| 186 |
var tag = jQuery(main_div).find('.ecwd_tags').val();
|
| 187 |
var venue = jQuery(main_div).find('.ecwd_venues').val();
|
|
@@ -204,11 +204,12 @@ if (typeof ecwd_js_init != "function")
|
|
| 204 |
ecwd_displays: displays,
|
| 205 |
ecwd_filters: filters,
|
| 206 |
ecwd_page_items: page_items,
|
| 207 |
-
ecwd_link: navLink.
|
| 208 |
ecwd_calendar_ids: calendar_ids,
|
| 209 |
ecwd_event_search: event_search,
|
| 210 |
-
ecwd_date:
|
| 211 |
ecwd_type: calendar_ids_class[1],
|
|
|
|
| 212 |
ecwd_nonce: ecwd.ajaxnonce
|
| 213 |
}, function (data) {
|
| 214 |
$(main_div).find('div.ecwd_calendar').replaceWith(data);
|
| 181 |
function doSearch(el) {
|
| 182 |
|
| 183 |
var main_div = jQuery(el).closest('.calendar_main');
|
| 184 |
+
var navLink = jQuery(main_div).find('.ecwd_current_link');
|
| 185 |
var query = jQuery(main_div).find('input.ecwd-search').val();
|
| 186 |
var tag = jQuery(main_div).find('.ecwd_tags').val();
|
| 187 |
var venue = jQuery(main_div).find('.ecwd_venues').val();
|
| 204 |
ecwd_displays: displays,
|
| 205 |
ecwd_filters: filters,
|
| 206 |
ecwd_page_items: page_items,
|
| 207 |
+
ecwd_link: navLink.val(),
|
| 208 |
ecwd_calendar_ids: calendar_ids,
|
| 209 |
ecwd_event_search: event_search,
|
| 210 |
+
ecwd_date: 1,
|
| 211 |
ecwd_type: calendar_ids_class[1],
|
| 212 |
+
ecwd_calendar_search:1,//not filter
|
| 213 |
ecwd_nonce: ecwd.ajaxnonce
|
| 214 |
}, function (data) {
|
| 215 |
$(main_div).find('div.ecwd_calendar').replaceWith(data);
|
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.
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
|
@@ -155,8 +155,11 @@ After downloading the ZIP file of the Event Calendar WD plugin,
|
|
| 155 |
|
| 156 |
== Changelog ==
|
| 157 |
|
|
|
|
|
|
|
|
|
|
| 158 |
= 1.0.82 =
|
| 159 |
-
*
|
| 160 |
|
| 161 |
= 1.0.81 =
|
| 162 |
* Fixed: Bug on widget list 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.83
|
| 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.83 =
|
| 159 |
+
* Fixed: Calendar search
|
| 160 |
+
|
| 161 |
= 1.0.82 =
|
| 162 |
+
* Changed: Featured plugins
|
| 163 |
|
| 164 |
= 1.0.81 =
|
| 165 |
* Fixed: Bug on widget list view
|
