Events Manager - Version 5.12.1

Version Description

  • fixed issue with scope sanitization preventing search form searching by date range
  • added limitation to prevent JS loading on non-EM post type editors to potentially help prevent 3rd party conflicts
  • added support for event location displaying url or other custom info for the ical LOCATION property
Download this release

Release Info

Developer netweblogic
Plugin Icon 128x128 Events Manager
Version 5.12.1
Comparing to
See all releases

Code changes from version 5.12 to 5.12.1

admin/em-options.php CHANGED
@@ -9,7 +9,6 @@ function em_options_save(){
9
  */
10
  if( current_user_can('manage_options') && !empty($_POST['em-submitted']) && check_admin_referer('events-manager-options','_wpnonce') ){
11
  //Build the array of options here
12
- $post = $_POST;
13
  foreach ($_POST as $postKey => $postValue){
14
  if( $postKey != 'dbem_data' && substr($postKey, 0, 5) == 'dbem_' ){
15
  //TODO some more validation/reporting
9
  */
10
  if( current_user_can('manage_options') && !empty($_POST['em-submitted']) && check_admin_referer('events-manager-options','_wpnonce') ){
11
  //Build the array of options here
 
12
  foreach ($_POST as $postKey => $postValue){
13
  if( $postKey != 'dbem_data' && substr($postKey, 0, 5) == 'dbem_' ){
14
  //TODO some more validation/reporting
classes/event-locations/em-event-location-url.php CHANGED
@@ -68,5 +68,9 @@ class URL extends Event_Location {
68
  return parent::output($what);
69
  }
70
  }
 
 
 
 
71
  }
72
  URL::init();
68
  return parent::output($what);
69
  }
70
  }
71
+
72
+ public function get_ical_location(){
73
+ return $this->url;
74
+ }
75
  }
76
  URL::init();
classes/event-locations/em-event-location.php CHANGED
@@ -201,6 +201,10 @@ class Event_Location {
201
  return static::get_label();
202
  }
203
  }
 
 
 
 
204
  }
205
 
206
  //include default Event Locations
201
  return static::get_label();
202
  }
203
  }
204
+
205
+ public function get_ical_location(){
206
+ return false;
207
+ }
208
  }
209
 
210
  //include default Event Locations
em-functions.php CHANGED
@@ -628,7 +628,10 @@ function em_get_search_form_defaults($args = array()){
628
  if( !empty($_REQUEST['scope']) && !is_array($_REQUEST['scope'])){
629
  $args['scope'] = explode(',',sanitize_text_field($_REQUEST['scope'])); //convert scope to an array in event of pagination
630
  }elseif( !empty($_REQUEST['scope']) ){
631
- $args['scope'] = sanitize_text_field($_REQUEST['scope']);
 
 
 
632
  }
633
  return $args;
634
  }
628
  if( !empty($_REQUEST['scope']) && !is_array($_REQUEST['scope'])){
629
  $args['scope'] = explode(',',sanitize_text_field($_REQUEST['scope'])); //convert scope to an array in event of pagination
630
  }elseif( !empty($_REQUEST['scope']) ){
631
+ $args['scope'] = array(); // reset and populate sanitized
632
+ foreach( $_REQUEST['scope'] as $k => $v ){
633
+ $args['scope'][absint($k)] = sanitize_text_field($v);
634
+ }
635
  }
636
  return $args;
637
  }
events-manager.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  Plugin Name: Events Manager
4
- Version: 5.12
5
  Plugin URI: http://wp-events-plugin.com
6
  Description: Event registration and booking management for WordPress. Recurring events, locations, webinars, google maps, rss, ical, booking registration and more!
7
  Author: Marcus Sykes
@@ -323,6 +323,11 @@ class EM_Scripts_and_Styles {
323
 
324
  public static function admin_enqueue( $hook_suffix = false ){
325
  if( $hook_suffix == 'post.php' || (!empty($_GET['page']) && substr($_GET['page'],0,14) == 'events-manager') || (!empty($_GET['post_type']) && in_array($_GET['post_type'], array(EM_POST_TYPE_EVENT,EM_POST_TYPE_LOCATION,'event-recurring'))) ){
 
 
 
 
 
326
  wp_enqueue_style( 'wp-color-picker' );
327
  wp_enqueue_script('events-manager', plugins_url('includes/js/events-manager.js',__FILE__), array('jquery', 'jquery-ui-core','jquery-ui-widget','jquery-ui-position','jquery-ui-sortable','jquery-ui-datepicker','jquery-ui-autocomplete','jquery-ui-dialog','wp-color-picker'), EM_VERSION);
328
  do_action('em_enqueue_admin_scripts');
1
  <?php
2
  /*
3
  Plugin Name: Events Manager
4
+ Version: 5.12.1
5
  Plugin URI: http://wp-events-plugin.com
6
  Description: Event registration and booking management for WordPress. Recurring events, locations, webinars, google maps, rss, ical, booking registration and more!
7
  Author: Marcus Sykes
323
 
324
  public static function admin_enqueue( $hook_suffix = false ){
325
  if( $hook_suffix == 'post.php' || (!empty($_GET['page']) && substr($_GET['page'],0,14) == 'events-manager') || (!empty($_GET['post_type']) && in_array($_GET['post_type'], array(EM_POST_TYPE_EVENT,EM_POST_TYPE_LOCATION,'event-recurring'))) ){
326
+ if( $hook_suffix == 'post.php' && empty($_GET['post_type']) && !empty($_GET['post']) ){
327
+ // don't load if the post being edited isn't an EM one
328
+ $post = get_post($_GET['post']);
329
+ if( !in_array($post->post_type, array(EM_POST_TYPE_EVENT,EM_POST_TYPE_LOCATION,'event-recurring')) ) return;
330
+ }
331
  wp_enqueue_style( 'wp-color-picker' );
332
  wp_enqueue_script('events-manager', plugins_url('includes/js/events-manager.js',__FILE__), array('jquery', 'jquery-ui-core','jquery-ui-widget','jquery-ui-position','jquery-ui-sortable','jquery-ui-datepicker','jquery-ui-autocomplete','jquery-ui-dialog','wp-color-picker'), EM_VERSION);
333
  do_action('em_enqueue_admin_scripts');
readme.txt CHANGED
@@ -4,8 +4,8 @@ Donate link: http://wp-events-plugin.com
4
  Tags: bookings, calendar, tickets, events, buddypress, event management, google maps, maps, locations, registration, zoom
5
  Text Domain: events-manager
6
  Requires at least: 5.2
7
- Tested up to: 5.8.1
8
- Stable tag: 5.12
9
  Requires PHP: 5.3
10
 
11
  Fully featured event registration management including recurring events, locations management, calendar, Google map integration, booking management
@@ -119,6 +119,11 @@ See our [FAQ](http://wp-events-plugin.com/documentation/faq/) page, which is upd
119
  6. Manage attendees with various booking reports
120
 
121
  == Changelog ==
 
 
 
 
 
122
  = 5.12 =
123
  * changed EM_Booking::$disable_restricions so that all ticket restrictions can ignored for admin manual bookings (pro feature) including spaces, roles and dates
124
  * added taxonomy filters for Meta Tag Manager compatibility on overriden taxonomy pages
4
  Tags: bookings, calendar, tickets, events, buddypress, event management, google maps, maps, locations, registration, zoom
5
  Text Domain: events-manager
6
  Requires at least: 5.2
7
+ Tested up to: 6.0
8
+ Stable tag: 5.12.1
9
  Requires PHP: 5.3
10
 
11
  Fully featured event registration management including recurring events, locations management, calendar, Google map integration, booking management
119
  6. Manage attendees with various booking reports
120
 
121
  == Changelog ==
122
+ = 5.12.1 =
123
+ * fixed issue with scope sanitization preventing search form searching by date range
124
+ * added limitation to prevent JS loading on non-EM post type editors to potentially help prevent 3rd party conflicts
125
+ * added support for event location displaying url or other custom info for the ical LOCATION property
126
+
127
  = 5.12 =
128
  * changed EM_Booking::$disable_restricions so that all ticket restrictions can ignored for admin manual bookings (pro feature) including spaces, roles and dates
129
  * added taxonomy filters for Meta Tag Manager compatibility on overriden taxonomy pages
templates/templates/ical.php CHANGED
@@ -99,6 +99,11 @@ while ( count($EM_Events) > 0 ){
99
  $apple_structured_location = str_replace('"', '\"', $apple_structured_location); //google chucks a wobbly with these on this line
100
  $apple_structured_location = em_mb_ical_wordwrap($apple_structured_location);
101
  }
 
 
 
 
 
102
  }
103
  $categories = array();
104
  foreach( $EM_Event->get_categories() as $EM_Category ){ /* @var EM_Category $EM_Category */
99
  $apple_structured_location = str_replace('"', '\"', $apple_structured_location); //google chucks a wobbly with these on this line
100
  $apple_structured_location = em_mb_ical_wordwrap($apple_structured_location);
101
  }
102
+ }elseif( $EM_Event->has_event_location() ){
103
+ $ical_location = $EM_Event->get_event_location()->get_ical_location();
104
+ if( $ical_location ){
105
+ $location = em_mb_ical_wordwrap('LOCATION:'.$ical_location);
106
+ }
107
  }
108
  $categories = array();
109
  foreach( $EM_Event->get_categories() as $EM_Category ){ /* @var EM_Category $EM_Category */