Version Description
- fixed a bug that arose in 5.8.1 where tag/category pages using formatting will still show the tags/categories list page instead
Download this release
Release Info
Developer | netweblogic |
Plugin | Events Manager |
Version | 5.8.1.1 |
Comparing to | |
See all releases |
Code changes from version 5.8.0.1 to 5.8.1.1
- classes/em-event.php +10 -5
- classes/em-location.php +6 -3
- classes/em-locations.php +0 -1
- classes/em-taxonomy-frontend.php +8 -1
- em-events.php +7 -2
- events-manager.php +1 -1
- readme.txt +16 -1
classes/em-event.php
CHANGED
@@ -295,6 +295,10 @@ class EM_Event extends EM_Object{
|
|
295 |
}
|
296 |
}else{
|
297 |
$event_post = $id;
|
|
|
|
|
|
|
|
|
298 |
}
|
299 |
$this->post_id = !empty($id->ID) ? $id->ID : $id;
|
300 |
}
|
@@ -416,6 +420,7 @@ class EM_Event extends EM_Object{
|
|
416 |
restore_current_blog();
|
417 |
$this->blog_id = $blog_id;
|
418 |
}elseif( EM_MS_GLOBAL ){
|
|
|
419 |
$this->ms_global_switch();
|
420 |
$event_meta = get_post_meta($this->post_id);
|
421 |
$this->ms_global_switch_back();
|
@@ -601,7 +606,7 @@ class EM_Event extends EM_Object{
|
|
601 |
$this->event_attributes[$att_key] = wp_unslash($att_value);
|
602 |
}
|
603 |
}
|
604 |
-
if( $att_value
|
605 |
$this->event_attributes[$att_key] = wp_unslash(wp_kses($event_available_attributes['values'][$att_key][0], $allowedtags));
|
606 |
}
|
607 |
}
|
@@ -2299,8 +2304,8 @@ class EM_Event extends EM_Object{
|
|
2299 |
//adjust certain meta information
|
2300 |
$event['event_start_date'] = $meta_fields['_event_start_date'] = date("Y-m-d", $day);
|
2301 |
$meta_fields['_start_ts'] = strtotime($event['event_start_date'].' '.$event['event_start_time']);
|
2302 |
-
if( !empty($
|
2303 |
-
$event_rsvp_days = $
|
2304 |
$event_rsvp_date = date('Y-m-d', strtotime($event_rsvp_days.' days', $meta_fields['_start_ts']));
|
2305 |
$event['event_rsvp_date'] = $meta_fields['_event_rsvp_date'] = $event_rsvp_date;
|
2306 |
}else{
|
@@ -2360,8 +2365,8 @@ class EM_Event extends EM_Object{
|
|
2360 |
//do we need to change the slugs?
|
2361 |
$post_fields['post_name'] = $event['event_slug'] = apply_filters('em_event_save_events_slug', $post_name.'-'.date($recurring_date_format, $EM_Event->start), $post_fields, $EM_Event->start, array(), $this);
|
2362 |
//adjust certain meta information relativv
|
2363 |
-
if( !empty($
|
2364 |
-
$event_rsvp_days = $
|
2365 |
$event_rsvp_date = date('Y-m-d', strtotime($event_rsvp_days.' days', $EM_Event->start));
|
2366 |
$event['event_rsvp_date'] = $meta_fields['_event_rsvp_date'] = $event_rsvp_date;
|
2367 |
}else{
|
295 |
}
|
296 |
}else{
|
297 |
$event_post = $id;
|
298 |
+
//if we're in MS Global mode, then unless a blog id was specified, we assume the current post object belongs to the current blog
|
299 |
+
if( EM_MS_GLOBAL && !is_numeric($search_by) ){
|
300 |
+
$this->blog_id = get_current_blog_id();
|
301 |
+
}
|
302 |
}
|
303 |
$this->post_id = !empty($id->ID) ? $id->ID : $id;
|
304 |
}
|
420 |
restore_current_blog();
|
421 |
$this->blog_id = $blog_id;
|
422 |
}elseif( EM_MS_GLOBAL ){
|
423 |
+
// if a blog ID wasn't defined then we'll check the main blog, in case the event was created in the past
|
424 |
$this->ms_global_switch();
|
425 |
$event_meta = get_post_meta($this->post_id);
|
426 |
$this->ms_global_switch_back();
|
606 |
$this->event_attributes[$att_key] = wp_unslash($att_value);
|
607 |
}
|
608 |
}
|
609 |
+
if( $att_value == '' && $att_vals > 1){
|
610 |
$this->event_attributes[$att_key] = wp_unslash(wp_kses($event_available_attributes['values'][$att_key][0], $allowedtags));
|
611 |
}
|
612 |
}
|
2304 |
//adjust certain meta information
|
2305 |
$event['event_start_date'] = $meta_fields['_event_start_date'] = date("Y-m-d", $day);
|
2306 |
$meta_fields['_start_ts'] = strtotime($event['event_start_date'].' '.$event['event_start_time']);
|
2307 |
+
if( !empty($this->recurrence_rsvp_days) && is_numeric($this->recurrence_rsvp_days) ){
|
2308 |
+
$event_rsvp_days = $this->recurrence_rsvp_days >= 0 ? '+'. $this->recurrence_rsvp_days: $this->recurrence_rsvp_days;
|
2309 |
$event_rsvp_date = date('Y-m-d', strtotime($event_rsvp_days.' days', $meta_fields['_start_ts']));
|
2310 |
$event['event_rsvp_date'] = $meta_fields['_event_rsvp_date'] = $event_rsvp_date;
|
2311 |
}else{
|
2365 |
//do we need to change the slugs?
|
2366 |
$post_fields['post_name'] = $event['event_slug'] = apply_filters('em_event_save_events_slug', $post_name.'-'.date($recurring_date_format, $EM_Event->start), $post_fields, $EM_Event->start, array(), $this);
|
2367 |
//adjust certain meta information relativv
|
2368 |
+
if( !empty($this->recurrence_rsvp_days) && is_numeric($this->recurrence_rsvp_days) ){
|
2369 |
+
$event_rsvp_days = $this->recurrence_rsvp_days >= 0 ? '+'. $this->recurrence_rsvp_days: $this->recurrence_rsvp_days;
|
2370 |
$event_rsvp_date = date('Y-m-d', strtotime($event_rsvp_days.' days', $EM_Event->start));
|
2371 |
$event['event_rsvp_date'] = $meta_fields['_event_rsvp_date'] = $event_rsvp_date;
|
2372 |
}else{
|
classes/em-location.php
CHANGED
@@ -157,7 +157,7 @@ class EM_Location extends EM_Object {
|
|
157 |
if(!$is_post){
|
158 |
if( EM_MS_GLOBAL && get_site_option('dbem_ms_mainblog_locations') ){
|
159 |
//blog_id will always be the main blog id if global locations are restricted only to the main blog
|
160 |
-
|
161 |
}
|
162 |
if( is_numeric($search_by) && is_multisite() ){
|
163 |
//we've been given a blog_id, so we're searching for a post id
|
@@ -168,6 +168,9 @@ class EM_Location extends EM_Object {
|
|
168 |
}
|
169 |
}else{
|
170 |
$location_post = $id;
|
|
|
|
|
|
|
171 |
}
|
172 |
$this->post_id = !empty($id->ID) ? $id->ID : $id;
|
173 |
}
|
@@ -188,11 +191,11 @@ class EM_Location extends EM_Object {
|
|
188 |
if( is_numeric($search_by) && is_multisite() ){
|
189 |
// if in multisite mode, switch blogs quickly to get the right post meta.
|
190 |
switch_to_blog($search_by);
|
191 |
-
$location_meta =
|
192 |
restore_current_blog();
|
193 |
$this->blog_id = $search_by;
|
194 |
}else{
|
195 |
-
$location_meta =
|
196 |
}
|
197 |
//Get custom fields
|
198 |
foreach($location_meta as $location_meta_key => $location_meta_val){
|
157 |
if(!$is_post){
|
158 |
if( EM_MS_GLOBAL && get_site_option('dbem_ms_mainblog_locations') ){
|
159 |
//blog_id will always be the main blog id if global locations are restricted only to the main blog
|
160 |
+
$search_by = $this->blog_id = get_current_site()->blog_id;
|
161 |
}
|
162 |
if( is_numeric($search_by) && is_multisite() ){
|
163 |
//we've been given a blog_id, so we're searching for a post id
|
168 |
}
|
169 |
}else{
|
170 |
$location_post = $id;
|
171 |
+
if( EM_MS_GLOBAL ){
|
172 |
+
$search_by = $this->blog_id = get_current_blog_id();
|
173 |
+
}
|
174 |
}
|
175 |
$this->post_id = !empty($id->ID) ? $id->ID : $id;
|
176 |
}
|
191 |
if( is_numeric($search_by) && is_multisite() ){
|
192 |
// if in multisite mode, switch blogs quickly to get the right post meta.
|
193 |
switch_to_blog($search_by);
|
194 |
+
$location_meta = get_post_meta($location_post->ID);
|
195 |
restore_current_blog();
|
196 |
$this->blog_id = $search_by;
|
197 |
}else{
|
198 |
+
$location_meta = get_post_meta($location_post->ID);
|
199 |
}
|
200 |
//Get custom fields
|
201 |
foreach($location_meta as $location_meta_key => $location_meta_val){
|
classes/em-locations.php
CHANGED
@@ -114,7 +114,6 @@ class EM_Locations extends EM_Object {
|
|
114 |
$join_events_table = apply_filters('em_locations_get_join_events_table', $join_events_table, $args, $count);
|
115 |
//depending on whether to join we do certain things like add a join SQL, change specific values like status search
|
116 |
$event_optional_join = $join_events_table ? "LEFT JOIN $events_table ON {$locations_table}.location_id={$events_table}.location_id" : '';
|
117 |
-
$args['event_status'] = $args['event_status'] === false ? $join_events_table : $args['event_status']; //if we're joining events table, by default we want status to match that of locations in this search
|
118 |
|
119 |
//Build ORDER BY and WHERE SQL statements here, after we've done all the pre-processing necessary
|
120 |
$conditions = self::build_sql_conditions($args);
|
114 |
$join_events_table = apply_filters('em_locations_get_join_events_table', $join_events_table, $args, $count);
|
115 |
//depending on whether to join we do certain things like add a join SQL, change specific values like status search
|
116 |
$event_optional_join = $join_events_table ? "LEFT JOIN $events_table ON {$locations_table}.location_id={$events_table}.location_id" : '';
|
|
|
117 |
|
118 |
//Build ORDER BY and WHERE SQL statements here, after we've done all the pre-processing necessary
|
119 |
$conditions = self::build_sql_conditions($args);
|
classes/em-taxonomy-frontend.php
CHANGED
@@ -79,7 +79,7 @@ class EM_Taxonomy_Frontend {
|
|
79 |
//set the template
|
80 |
$template = locate_template(array('page.php','index.php'),false); //category becomes a page
|
81 |
//sort out filters
|
82 |
-
|
83 |
add_filter('the_content', array(self::$this_class,'the_content')); //come in slightly early and consider other plugins
|
84 |
//Yoast WP SEO Tweals
|
85 |
if( defined('WPSEO_VERSION') ){
|
@@ -108,6 +108,13 @@ class EM_Taxonomy_Frontend {
|
|
108 |
return $content;
|
109 |
}
|
110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
/**
|
112 |
* Parses the query on regular taxonomy archives so events are cronologically ordered.
|
113 |
* @param WP_Query $wp_query
|
79 |
//set the template
|
80 |
$template = locate_template(array('page.php','index.php'),false); //category becomes a page
|
81 |
//sort out filters
|
82 |
+
add_filter('wp_head', 'EM_Taxonomy_Frontend::remove_em_the_content', 10000);
|
83 |
add_filter('the_content', array(self::$this_class,'the_content')); //come in slightly early and consider other plugins
|
84 |
//Yoast WP SEO Tweals
|
85 |
if( defined('WPSEO_VERSION') ){
|
108 |
return $content;
|
109 |
}
|
110 |
|
111 |
+
/**
|
112 |
+
* Removes the em_content filter from firing, which should be triggered by wp_head after EM has added this filter
|
113 |
+
*/
|
114 |
+
public static function remove_em_the_content(){
|
115 |
+
remove_filter('the_content', 'em_content');
|
116 |
+
}
|
117 |
+
|
118 |
/**
|
119 |
* Parses the query on regular taxonomy archives so events are cronologically ordered.
|
120 |
* @param WP_Query $wp_query
|
em-events.php
CHANGED
@@ -25,7 +25,8 @@ function em_content($page_content) {
|
|
25 |
'pagination' => 1
|
26 |
);
|
27 |
$args['ajax'] = isset($args['ajax']) ? $args['ajax']:(!defined('EM_AJAX') || EM_AJAX );
|
28 |
-
if(
|
|
|
29 |
$content = apply_filters('em_content_pre', '', $page_content);
|
30 |
if( empty($content) ){
|
31 |
ob_start();
|
@@ -125,7 +126,11 @@ function em_content($page_content) {
|
|
125 |
}
|
126 |
return $page_content;
|
127 |
}
|
128 |
-
|
|
|
|
|
|
|
|
|
129 |
|
130 |
/**
|
131 |
* Filter for titles when on event pages
|
25 |
'pagination' => 1
|
26 |
);
|
27 |
$args['ajax'] = isset($args['ajax']) ? $args['ajax']:(!defined('EM_AJAX') || EM_AJAX );
|
28 |
+
if( !post_password_required() && in_array($post->ID, array($events_page_id, $locations_page_id, $categories_page_id, $edit_bookings_page_id, $edit_events_page_id, $edit_locations_page_id, $my_bookings_page_id, $tags_page_id)) ){
|
29 |
+
get_post();
|
30 |
$content = apply_filters('em_content_pre', '', $page_content);
|
31 |
if( empty($content) ){
|
32 |
ob_start();
|
126 |
}
|
127 |
return $page_content;
|
128 |
}
|
129 |
+
//add the_content filter AFTER wp_head functions have run, so we don't interfere with plugins like WP SEO and other meta-related plugins that make use of the_content for our pages
|
130 |
+
function em_add_content_filter_after_head(){
|
131 |
+
add_filter('the_content', 'em_content');
|
132 |
+
}
|
133 |
+
add_action('wp_head', 'em_add_content_filter_after_head', 1000);
|
134 |
|
135 |
/**
|
136 |
* Filter for titles when on event pages
|
events-manager.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Events Manager
|
4 |
-
Version: 5.8.
|
5 |
Plugin URI: http://wp-events-plugin.com
|
6 |
Description: Event registration and booking management for WordPress. Recurring events, locations, google maps, rss, ical, booking registration and more!
|
7 |
Author: Marcus Sykes
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Events Manager
|
4 |
+
Version: 5.8.1.1
|
5 |
Plugin URI: http://wp-events-plugin.com
|
6 |
Description: Event registration and booking management for WordPress. Recurring events, locations, google maps, rss, ical, booking registration and more!
|
7 |
Author: Marcus Sykes
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: bookings, calendar, tickets, events, buddypress, event management, google
|
|
5 |
Text Domain: events-manager
|
6 |
Requires at least: 3.5
|
7 |
Tested up to: 4.9
|
8 |
-
Stable tag: 5.8.
|
9 |
|
10 |
Fully featured event registration management including recurring events, locations management, calendar, Google map integration, booking management
|
11 |
|
@@ -99,7 +99,22 @@ See our [FAQ](http://wp-events-plugin.com/documentation/faq/) page, which is upd
|
|
99 |
6. Manage attendees with various booking reports
|
100 |
|
101 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
= 5.8.0.1 =
|
|
|
|
|
|
|
103 |
* fixed category color picker and image uploader problems
|
104 |
* created base classes for EM taxonomies to make adding custom EM taxonomies even easier in the future,
|
105 |
* added tag image and color settings/data
|
5 |
Text Domain: events-manager
|
6 |
Requires at least: 3.5
|
7 |
Tested up to: 4.9
|
8 |
+
Stable tag: 5.8.1.1
|
9 |
|
10 |
Fully featured event registration management including recurring events, locations management, calendar, Google map integration, booking management
|
11 |
|
99 |
6. Manage attendees with various booking reports
|
100 |
|
101 |
== Changelog ==
|
102 |
+
|
103 |
+
= 5.8.1.1 =
|
104 |
+
* fixed a bug that arose in 5.8.1 where tag/category pages using formatting will still show the tags/categories list page instead
|
105 |
+
|
106 |
+
= 5.8.1 =
|
107 |
+
* fixed recurring events booking cut-off dates not being taken into consideration when creating/editing recurrences
|
108 |
+
* fixes various issues that arose in 5.8 update:
|
109 |
+
* removed use of is_main_query() and in_the_loop() within the_content filter of em_the_content due to conflicts with certain theme builders
|
110 |
+
* fixed locations without attached events not showing up in autocomplete and dropdowns for creating/editing events
|
111 |
+
* fixed multisite issues loading single event pages in MS Global mode
|
112 |
+
* fixed dropdown custom #_ATT fields not saving properly
|
113 |
+
|
114 |
= 5.8.0.1 =
|
115 |
+
* fixed bug introduced in 5.8 which did not correctly return content in get_the_excerpt filters
|
116 |
+
|
117 |
+
= 5.8 =
|
118 |
* fixed category color picker and image uploader problems
|
119 |
* created base classes for EM taxonomies to make adding custom EM taxonomies even easier in the future,
|
120 |
* added tag image and color settings/data
|