The Events Calendar - Version 4.0.6

Version Description

Download this release

Release Info

Developer barry.hughes
Plugin Icon The Events Calendar
Version 4.0.6
Comparing to
See all releases

Code changes from version 4.0.5 to 4.0.6

common/src/Tribe/Main.php CHANGED
@@ -17,7 +17,7 @@ class Tribe__Main {
17
const OPTIONNAME = 'tribe_events_calendar_options';
18
const OPTIONNAMENETWORK = 'tribe_events_calendar_network_options';
19
20
- const VERSION = '4.0.5';
21
const FEED_URL = 'https://theeventscalendar.com/feed/';
22
23
protected $plugin_context;
17
const OPTIONNAME = 'tribe_events_calendar_options';
18
const OPTIONNAMENETWORK = 'tribe_events_calendar_network_options';
19
20
+ const VERSION = '4.0.6';
21
const FEED_URL = 'https://theeventscalendar.com/feed/';
22
23
protected $plugin_context;
common/src/Tribe/Settings_Manager.php CHANGED
@@ -234,12 +234,12 @@ class Tribe__Settings_Manager {
234
* only if premium addons are detected.
235
*/
236
protected function do_licenses_tab() {
237
- $show_tab = ( current_user_can( 'update_plugins' ) && $this->have_addons() );
238
239
/**
240
* Provides an oppotunity to override the decision to show or hide the licenses tab
241
*
242
- * Normally it will only show if the current user has the "update_plugins" capability
243
* and there are some currently-activated premium plugins.
244
*
245
* @var bool
234
* only if premium addons are detected.
235
*/
236
protected function do_licenses_tab() {
237
+ $show_tab = ( current_user_can( 'activate_plugins' ) && $this->have_addons() );
238
239
/**
240
* Provides an oppotunity to override the decision to show or hide the licenses tab
241
*
242
+ * Normally it will only show if the current user has the "activate_plugins" capability
243
* and there are some currently-activated premium plugins.
244
*
245
* @var bool
common/tribe-common.php CHANGED
@@ -1,7 +1,7 @@
1
<?php
2
/*
3
Description: An event settings framework for managing shared options
4
- Version: 4.0.2
5
Author: Modern Tribe, Inc.
6
Author URI: http://m.tri.be/1x
7
Text Domain: tribe-common
1
<?php
2
/*
3
Description: An event settings framework for managing shared options
4
+ Version: 4.0.6
5
Author: Modern Tribe, Inc.
6
Author URI: http://m.tri.be/1x
7
Text Domain: tribe-common
readme.txt CHANGED
@@ -1,11 +1,11 @@
1
=== The Events Calendar ===
2
3
- Contributors: ModernTribe, borkweb, zbtirrell, barry.hughes, bordoni, brianjessee, brook-tribe, faction23, geoffgraham, ggwicz, jazbek, jbrinley, joshlimecuda, leahkoerper, lucatume, mastromktg, mat-lipe, mdbitz, neillmcshea, nicosantos, peterchester, reid.peifer, roblagatta, ryancurban, shane.pearlman, thatdudebutch
4
Tags: events, calendar, event, venue, organizer, dates, date, google maps, conference, workshop, concert, meeting, seminar, summit, class, modern tribe, tribe, widget
5
Donate link: http://m.tri.be/29
6
Requires at least: 3.9
7
- Tested up to: 4.4.1
8
- Stable tag: 4.0.5
9
License: GPLv2 or later
10
License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
@@ -309,6 +309,18 @@ At no point during the 3.0 lifecycle will the major version change. But you can
309
310
== Changelog ==
311
312
= [4.0.5] 2016-01-15 =
313
314
* Security - Security fix with Venues and Organizers (props to grantdayjames for reporting this!)
1
=== The Events Calendar ===
2
3
+ Contributors: ModernTribe, borkweb, zbtirrell, barry.hughes, bordoni, brianjessee, brook-tribe, faction23, geoffgraham, ggwicz, jazbek, jbrinley, joshlimecuda, leahkoerper, lucatume, mastromktg, mat-lipe, mdbitz, neillmcshea, nicosantos, peterchester, reid.peifer, roblagatta, ryancurban, shane.pearlman, thatdudebutch, joinfof, cliffpaulick, GeoffBel
4
Tags: events, calendar, event, venue, organizer, dates, date, google maps, conference, workshop, concert, meeting, seminar, summit, class, modern tribe, tribe, widget
5
Donate link: http://m.tri.be/29
6
Requires at least: 3.9
7
+ Tested up to: 4.4.2
8
+ Stable tag: 4.0.6
9
License: GPLv2 or later
10
License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
309
310
== Changelog ==
311
312
+ = [4.0.6] 2016-02-17 =
313
+
314
+ * Tweak - Adjust injection of event data into the_content from priority 10 to 9 for better 3rd-party plugin compatibility
315
+ * Tweak - Change mobile month view selector to load event details below the calendar for better theme compatibility
316
+ * Tweak - Better handling of edge cases on the post_excerpt for List View
317
+ * Tweak - Removal of generic CSS classes like `.updated` and `.published`
318
+ * Fix - Prevent Notices from appearing when using `tribe_get_organizer()`
319
+ * Fix - Make HTML Single Event Pages valid
320
+ * Fix - Numeric named categories URLs are now fully working
321
+ * Fix - Event Title now Accepts HTML on Tooltips
322
+ * Fix - Licenses Tab now will work with `DISALLOW_FILE_MODS` (Props to Sun for spotting and fixing this)
323
+
324
= [4.0.5] 2016-01-15 =
325
326
* Security - Security fix with Venues and Organizers (props to grantdayjames for reporting this!)
src/Tribe/Main.php CHANGED
@@ -32,7 +32,7 @@ if ( ! class_exists( 'Tribe__Events__Main' ) ) {
32
const VENUE_POST_TYPE = 'tribe_venue';
33
const ORGANIZER_POST_TYPE = 'tribe_organizer';
34
35
- const VERSION = '4.0.5';
36
const MIN_ADDON_VERSION = '4.0';
37
const WP_PLUGIN_URL = 'http://wordpress.org/extend/plugins/the-events-calendar/';
38
32
const VENUE_POST_TYPE = 'tribe_venue';
33
const ORGANIZER_POST_TYPE = 'tribe_organizer';
34
35
+ const VERSION = '4.0.6';
36
const MIN_ADDON_VERSION = '4.0';
37
const WP_PLUGIN_URL = 'http://wordpress.org/extend/plugins/the-events-calendar/';
38
src/Tribe/Query.php CHANGED
@@ -286,7 +286,7 @@ if ( ! class_exists( 'Tribe__Events__Query' ) ) {
286
if ( ! in_array( $query->get( Tribe__Events__Main::TAXONOMY ), array( '', '-1' ) ) ) {
287
$tax_query[] = array(
288
'taxonomy' => Tribe__Events__Main::TAXONOMY,
289
- 'field' => is_numeric( $query->get( Tribe__Events__Main::TAXONOMY ) ) ? 'id' : 'slug',
290
'terms' => $query->get( Tribe__Events__Main::TAXONOMY ),
291
'include_children' => apply_filters( 'tribe_events_query_include_children', true ),
292
);
286
if ( ! in_array( $query->get( Tribe__Events__Main::TAXONOMY ), array( '', '-1' ) ) ) {
287
$tax_query[] = array(
288
'taxonomy' => Tribe__Events__Main::TAXONOMY,
289
+ 'field' => 'slug',
290
'terms' => $query->get( Tribe__Events__Main::TAXONOMY ),
291
'include_children' => apply_filters( 'tribe_events_query_include_children', true ),
292
);
src/Tribe/Rewrite.php CHANGED
@@ -81,10 +81,14 @@ if ( ! class_exists( 'Tribe__Events__Rewrite' ) ) {
81
add_filter( 'generate_rewrite_rules', array( $this, 'filter_generate' ) );
82
add_filter( 'post_type_link', array( $this, 'filter_post_type_link' ), 15, 2 );
83
84
} elseif ( true === $remove ) {
85
// Remove the Hooks
86
remove_filter( 'generate_rewrite_rules', array( $this, 'filter_generate' ) );
87
remove_filter( 'post_type_link', array( $this, 'filter_post_type_link' ), 15 );
88
}
89
}
90
@@ -190,6 +194,9 @@ if ( ! class_exists( 'Tribe__Events__Rewrite' ) ) {
190
* @return string Permalink with the language
191
*/
192
public function filter_post_type_link( $permalink, $post ) {
193
if ( ! $this->is_wpml_active() || empty( $_GET['lang'] ) ) {
194
return $permalink;
195
}
@@ -266,7 +273,7 @@ if ( ! class_exists( 'Tribe__Events__Rewrite' ) ) {
266
// By default we load the Default and our plugin domains
267
$domains = apply_filters( 'tribe_events_rewrite_i18n_domains', array(
268
'default' => true, // Default doesn't need file path
269
- 'the-events-calendar' => Tribe__Events__Main::instance()->pluginDir . 'lang/',
270
) );
271
272
// If WPML exists we treat the multiple languages
@@ -287,15 +294,20 @@ if ( ! class_exists( 'Tribe__Events__Rewrite' ) ) {
287
$current_locale = $sitepress->get_locale( $sitepress->get_current_language() );
288
289
// Get the strings on multiple Domains and Languages
290
- $bases = Tribe__Events__Main::instance()->get_i18n_strings( $bases, $languages, $domains, $current_locale );
291
}
292
293
if ( 'regex' === $method ){
294
foreach ( $bases as $type => $base ) {
295
$bases[ $type ] = '(?:' . implode( '|', $base ) . ')';
296
}
297
}
298
299
/**
300
* Use `tribe_events_rewrite_i18n_slugs` to modify the final version of the l10n slugs bases
301
*/
@@ -440,12 +452,12 @@ if ( ! class_exists( 'Tribe__Events__Rewrite' ) ) {
440
* handling is required.
441
*
442
* @var string $permastruct_name
443
- * @var string $possible_slug_name
444
*/
445
$needs_handling = apply_filters( 'tribe_events_rewrite_utf8_handling',
446
true,
447
$permastruct_name,
448
- $possible_slug_name
449
);
450
}
451
@@ -456,9 +468,6 @@ if ( ! class_exists( 'Tribe__Events__Rewrite' ) ) {
456
// UTF8 encoding results in lots of "%" chars in our string which play havoc
457
// with WP_Rewrite::generate_rewrite_rules(), so we swap them out temporarily
458
$sanitized_slug = str_replace( '%', self::PERCENT_PLACEHOLDER, $sanitized_slug );
459
-
460
- // Restore the % chars later on
461
- add_filter( $permastruct_name . '_rewrite_rules', array( $this, 'remove_percent_placeholders' ) );
462
}
463
464
/**
@@ -483,15 +492,37 @@ if ( ! class_exists( 'Tribe__Events__Rewrite' ) ) {
483
* @return array
484
*/
485
public function remove_percent_placeholders( array $rules ) {
486
- $new_rules = array();
487
-
488
foreach ( $rules as $key => $value ) {
489
- $key = str_replace( self::PERCENT_PLACEHOLDER, '%', $key );
490
- $new_rules[$key] = $value;
491
}
492
493
- return $new_rules;
494
}
495
} // end Tribe__Events__Rewrite class
496
497
} // end if !class_exists Tribe__Events__Rewrite
81
add_filter( 'generate_rewrite_rules', array( $this, 'filter_generate' ) );
82
add_filter( 'post_type_link', array( $this, 'filter_post_type_link' ), 15, 2 );
83
84
+ // Remove percent Placeholders on all items
85
+ add_filter( 'rewrite_rules_array', array( $this, 'remove_percent_placeholders' ), 25 );
86
+
87
} elseif ( true === $remove ) {
88
// Remove the Hooks
89
remove_filter( 'generate_rewrite_rules', array( $this, 'filter_generate' ) );
90
remove_filter( 'post_type_link', array( $this, 'filter_post_type_link' ), 15 );
91
+ remove_filter( 'rewrite_rules_array', array( $this, 'remove_percent_placeholders' ), 25 );
92
}
93
}
94
194
* @return string Permalink with the language
195
*/
196
public function filter_post_type_link( $permalink, $post ) {
197
+ // When creating the link we need to re-do the Percent Placeholder
198
+ $permalink = str_replace( self::PERCENT_PLACEHOLDER, '%', $permalink );
199
+
200
if ( ! $this->is_wpml_active() || empty( $_GET['lang'] ) ) {
201
return $permalink;
202
}
273
// By default we load the Default and our plugin domains
274
$domains = apply_filters( 'tribe_events_rewrite_i18n_domains', array(
275
'default' => true, // Default doesn't need file path
276
+ 'the-events-calendar' => $tec->pluginDir . 'lang/',
277
) );
278
279
// If WPML exists we treat the multiple languages
294
$current_locale = $sitepress->get_locale( $sitepress->get_current_language() );
295
296
// Get the strings on multiple Domains and Languages
297
+ $bases = $tec->get_i18n_strings( $bases, $languages, $domains, $current_locale );
298
}
299
300
if ( 'regex' === $method ){
301
foreach ( $bases as $type => $base ) {
302
+ // Escape all the Bases
303
+ $base = array_map( 'preg_quote', $base );
304
+
305
+ // Create the Regular Expression
306
$bases[ $type ] = '(?:' . implode( '|', $base ) . ')';
307
}
308
}
309
310
+
311
/**
312
* Use `tribe_events_rewrite_i18n_slugs` to modify the final version of the l10n slugs bases
313
*/
452
* handling is required.
453
*
454
* @var string $permastruct_name
455
+ * @var string $slug
456
*/
457
$needs_handling = apply_filters( 'tribe_events_rewrite_utf8_handling',
458
true,
459
$permastruct_name,
460
+ $slug
461
);
462
}
463
468
// UTF8 encoding results in lots of "%" chars in our string which play havoc
469
// with WP_Rewrite::generate_rewrite_rules(), so we swap them out temporarily
470
$sanitized_slug = str_replace( '%', self::PERCENT_PLACEHOLDER, $sanitized_slug );
471
}
472
473
/**
492
* @return array
493
*/
494
public function remove_percent_placeholders( array $rules ) {
495
foreach ( $rules as $key => $value ) {
496
+ $this->replace_array_key( $rules, $key, str_replace( self::PERCENT_PLACEHOLDER, '%', $key ) );
497
}
498
499
+ return $rules;
500
}
501
+
502
+ /**
503
+ * A way to replace an Array key without destroying the array ordering
504
+ *
505
+ * @since 4.0.6
506
+ *
507
+ * @param array &$array The Rules Array should be used here
508
+ * @param string $search Search for this Key
509
+ * @param string $replace Replace with this key]
510
+ * @return bool Did we replace anything?
511
+ */
512
+ private function replace_array_key( &$array, $search, $replace ) {
513
+ $keys = array_keys( $array );
514
+ $index = array_search( $search, $keys );
515
+
516
+ if ( false !== $index ) {
517
+ $keys[ $index ] = $replace;
518
+ $array = array_combine( $keys, $array );
519
+
520
+ return true;
521
+ }
522
+
523
+ return false;
524
+ }
525
+
526
} // end Tribe__Events__Rewrite class
527
528
} // end if !class_exists Tribe__Events__Rewrite
src/Tribe/Templates.php CHANGED
@@ -284,7 +284,8 @@ if ( ! class_exists( 'Tribe__Events__Templates' ) ) {
284
add_action( 'the_post', array( __CLASS__, 'spoof_the_post' ) );
285
286
// on the_content, load our events template
287
- add_filter( 'the_content', array( __CLASS__, 'load_ecp_into_page_template' ) );
288
289
// remove the comments template
290
add_filter( 'comments_template', array( __CLASS__, 'load_ecp_comments_page_template' ) );
@@ -451,7 +452,7 @@ if ( ! class_exists( 'Tribe__Events__Templates' ) ) {
451
*/
452
public static function load_ecp_into_page_template() {
453
// only run once!!!
454
- remove_filter( 'the_content', array( __CLASS__, 'load_ecp_into_page_template' ) );
455
456
self::restoreQuery();
457
284
add_action( 'the_post', array( __CLASS__, 'spoof_the_post' ) );
285
286
// on the_content, load our events template
287
+ // We're hooking to priority 9 for better compatibility with other non-tribe plugins that hook to the_content
288
+ add_filter( 'the_content', array( __CLASS__, 'load_ecp_into_page_template' ), 9 );
289
290
// remove the comments template
291
add_filter( 'comments_template', array( __CLASS__, 'load_ecp_comments_page_template' ) );
452
*/
453
public static function load_ecp_into_page_template() {
454
// only run once!!!
455
+ remove_filter( 'the_content', array( __CLASS__, 'load_ecp_into_page_template' ), 9 );
456
457
self::restoreQuery();
458
src/functions/template-tags/general.php CHANGED
@@ -1022,7 +1022,7 @@ if ( class_exists( 'Tribe__Events__Main' ) ) {
1022
$category_classes = tribe_events_event_classes( $event->ID, false );
1023
1024
$json['eventId'] = $event->ID;
1025
- $json['title'] = $event->post_title;
1026
$json['permalink'] = tribe_get_event_link( $event->ID );
1027
$json['imageSrc'] = $image_src;
1028
$json['dateDisplay'] = $date_display;
@@ -1320,6 +1320,24 @@ if ( class_exists( 'Tribe__Events__Main' ) ) {
1320
$excerpt = $post->post_excerpt;
1321
} else {
1322
$excerpt = $post->post_content;
1323
}
1324
1325
// Remove all shortcode Content before removing HTML
@@ -1330,23 +1348,6 @@ if ( class_exists( 'Tribe__Events__Main' ) ) {
1330
// Remove "all" HTML based on what is allowed
1331
$excerpt = wp_kses( $excerpt, $allowed_html );
1332
1333
- /**
1334
- * Filter the number of words in an excerpt.
1335
- *
1336
- * @param int $number The number of words. Default 55.
1337
- */
1338
- $excerpt_length = apply_filters( 'excerpt_length', 55 );
1339
-
1340
- /**
1341
- * Filter the string in the "more" link displayed after a trimmed excerpt.
1342
- *
1343
- * @param string $more_string The string shown within the more link.
1344
- */
1345
- $excerpt_more = apply_filters( 'excerpt_more', ' [&hellip;]' );
1346
-
1347
- // Now we actually trim it
1348
- $excerpt = wp_trim_words( $excerpt, $excerpt_length, $excerpt_more );
1349
-
1350
return wpautop( $excerpt );
1351
}
1352
1022
$category_classes = tribe_events_event_classes( $event->ID, false );
1023
1024
$json['eventId'] = $event->ID;
1025
+ $json['title'] = wp_kses_post( $event->post_title );
1026
$json['permalink'] = tribe_get_event_link( $event->ID );
1027
$json['imageSrc'] = $image_src;
1028
$json['dateDisplay'] = $date_display;
1320
$excerpt = $post->post_excerpt;
1321
} else {
1322
$excerpt = $post->post_content;
1323
+ // We will only trim Excerpt if it comes from Post Content
1324
+
1325
+ /**
1326
+ * Filter the number of words in an excerpt.
1327
+ *
1328
+ * @param int $number The number of words. Default 55.
1329
+ */
1330
+ $excerpt_length = apply_filters( 'excerpt_length', 55 );
1331
+
1332
+ /**
1333
+ * Filter the string in the "more" link displayed after a trimmed excerpt.
1334
+ *
1335
+ * @param string $more_string The string shown within the more link.
1336
+ */
1337
+ $excerpt_more = apply_filters( 'excerpt_more', ' [&hellip;]' );
1338
+
1339
+ // Now we actually trim it
1340
+ $excerpt = wp_trim_words( $excerpt, $excerpt_length, $excerpt_more );
1341
}
1342
1343
// Remove all shortcode Content before removing HTML
1348
// Remove "all" HTML based on what is allowed
1349
$excerpt = wp_kses( $excerpt, $allowed_html );
1350
1351
return wpautop( $excerpt );
1352
}
1353
src/resources/js/tribe-events-ajax-calendar.js CHANGED
@@ -116,7 +116,7 @@
116
var $target = $( '.tribe-mobile-day[data-day="' + date + '"]' ),
117
$cell = $( '.tribe-events-calendar td[data-day="' + date + '"]' ),
118
$more = $cell.find( '.tribe-events-viewmore' ),
119
- $events = $cell.find( '.hentry' );
120
121
if ( $events.length ) {
122
$events
116
var $target = $( '.tribe-mobile-day[data-day="' + date + '"]' ),
117
$cell = $( '.tribe-events-calendar td[data-day="' + date + '"]' ),
118
$more = $cell.find( '.tribe-events-viewmore' ),
119
+ $events = $cell.find( '.type-tribe_events' );
120
121
if ( $events.length ) {
122
$events
src/resources/js/tribe-events-ajax-calendar.min.js CHANGED
@@ -1 +1 @@
1
- !function(a,b,c,d,e,f,g,h,i,j){c(b).ready(function(){function j(a){var b=c('.tribe-mobile-day[data-day="'+a+'"]'),d=c('.tribe-events-calendar td[data-day="'+a+'"]'),e=d.find(".tribe-events-viewmore"),f=d.find(".hentry");f.length&&(f.each(function(){var a=c(this);if(a.tribe_has_attr("data-tribejson")){var d=a.data("tribejson");b.append(tribe_tmpl("tribe_tmpl_month_mobile",d))}}),e.length&&b.append(e.clone()))}function k(a){var b=a.data("tribejson");b.date=a.attr("data-day");var c=a.parents(".tribe-events-calendar"),d=c.next("#tribe-mobile-container"),e=d.find(".tribe-mobile-day"),f=c.find(".mobile-trigger"),g='[data-day="'+b.date+'"]',h=e.filter(g);b.has_events=a.hasClass("tribe-events-has-events"),f.removeClass("mobile-active").filter(g).addClass("mobile-active"),e.hide(),h.length?h.show():(d.append(tribe_tmpl("tribe_tmpl_month_mobile_day_header",b)),j(b.date))}function l(){var a=t.find(".tribe-events-present"),d=t.find(".mobile-trigger"),e=t.find(b.getElementById("tribe-events-content")).find(".tribe-events-calendar");if(c("#tribe-mobile-container").length||c('<div id="tribe-mobile-container" />').insertAfter(e),a.length&&a.is(".tribe-events-thismonth"))k(a);else{var f=d.filter(".tribe-events-thismonth").first();k(f)}}function m(){t.find(".tribe-events-calendar th").each(function(){var a=c(this),b=a.attr("data-day-abbr"),d=a.attr("title");q.is(".tribe-mobile")?a.text(b):a.text(d)})}function n(a){q.is(".tribe-mobile")?(m(),l()):a&&m()}function o(a){if("change_view"!=tribe_events_bar_action){if(a.preventDefault(),g.ajax_running)return;u.val().length?"0"!==g.datepicker_format?g.date=tribeDateFormat(u.bootstrapDatepicker("getDate"),"tribeMonthQuery"):g.date=u.val():v||(g.date=d.cur_date.slice(0,-3)),g.filter_cats?d.cur_url=c("#tribe-events-header").data("baseurl")+g.date+"/":d.default_permalinks?d.cur_url=w:d.cur_url=w+g.date+"/",g.popping=!1,f.pre_ajax(function(){p()})}}function p(){f.invalid_date(g.date)||(c(".tribe-events-calendar").tribe_spin(),g.pushcount=0,g.ajax_running=!0,g.popping||(g.params={action:"tribe_calendar",eventDate:g.date},g.url_params={},g.category&&(g.params.tribe_event_category=g.category,g.url_params.tribe_events_cat=g.category),d.default_permalinks&&(g.url_params.hasOwnProperty("post_type")||(g.url_params.post_type=i.events_post_type),g.url_params.hasOwnProperty("eventDisplay")||(g.url_params.eventDisplay=g.view)),c(e).trigger("tribe_ev_serializeBar"),g.params=c.param(g.params),g.url_params=c.param(g.url_params),c(e).trigger("tribe_ev_collectParams"),g.pushcount>0||g.filters||d.default_permalinks||g.category?(g.do_string=!0,g.pushstate=!1):(g.do_string=!1,g.pushstate=!0)),h.pushstate&&!g.filter_cats?(c(e).trigger("tribe_ev_ajaxStart").trigger("tribe_ev_monthView_AjaxStart"),c.post(TribeCalendar.ajaxurl,g.params,function(a){if(g.initial_load=!1,f.enable_inputs("#tribe_events_filters_form","input, select"),a.success){g.ajax_running=!1,d.ajax_response={total_count:"",view:a.view,max_pages:"",tribe_paged:"",timestamp:(new Date).getTime()};var h="";h=c.isFunction(c.fn.parseHTML)?c.parseHTML(a.html):a.html,c("#tribe-events-content").replaceWith(h),n(!0),g.page_title=c("#tribe-events-header").data("title"),b.title=g.page_title,g.do_string&&(d.cur_url=d.cur_url+"?"+g.url_params,history.pushState({tribe_date:g.date,tribe_params:g.params},g.page_title,d.cur_url)),g.pushstate&&history.pushState({tribe_date:g.date,tribe_params:g.params},g.page_title,d.cur_url),c(e).trigger("tribe_ev_ajaxSuccess").trigger("tribe_ev_monthView_ajaxSuccess")}})):g.url_params.length?a.location=d.cur_url+"?"+g.url_params:a.location=d.cur_url)}var q=c("body"),r=c('[class^="tribe-events-nav-"] a'),s=f.get_url_param("tribe-bar-date"),t=c("#tribe-events"),u=c("#tribe-bar-date"),v=!1,w="/";"undefined"!=typeof i.events_base?w=i.events_base:r.length&&(w=r.first().attr("href").slice(0,-8)),d.default_permalinks&&(w=w.split("?")[0]),c(".tribe-events-calendar").length&&c("#tribe-events-bar").length&&s&&s.length>7&&(c("#tribe-bar-date-day").val(s.slice(-3)),u.val(s.substring(0,7)));var x="yyyy-mm";if("0"!==g.datepicker_format){var y=parseInt(g.datepicker_format),z="m"+g.datepicker_format.toString();x=d.datepicker_formats.month[y],s&&(s.length<=7&&(s+="-01"),u.val(tribeDateFormat(s,z)))}if(d.datepicker_opts={format:x,minViewMode:"months",autoclose:!0},u.bootstrapDatepicker(d.datepicker_opts).on("changeDate",function(a){g.mdate=a.date;var b=a.date.getFullYear(),e=("0"+(a.date.getMonth()+1)).slice(-2);if(v=!0,g.date=b+"-"+e,h.no_bar()||h.live_ajax()&&h.pushstate){if(g.ajax_running||g.updating_picker)return;g.filter_cats?d.cur_url=c("#tribe-events-header").data("baseurl")+g.date+"/":d.default_permalinks?d.cur_url=w:d.cur_url=w+g.date+"/",g.popping=!1,f.pre_ajax(function(){p()})}}),n(!0),c(e).on("tribe_ev_resizeComplete",function(){n(!0)}),h.pushstate&&!h.map_view()){var A="action=tribe_calendar&eventDate="+c("#tribe-events-header").data("date");d.params.length&&(A=A+"&"+d.params),g.category&&(A=A+"&tribe_event_category="+g.category),history.replaceState({tribe_params:A},g.page_title,location.href),c(a).on("popstate",function(a){var b=a.originalEvent.state;b&&(g.do_string=!1,g.pushstate=!1,g.popping=!0,g.params=b.tribe_params,f.pre_ajax(function(){p()}),f.set_form(g.params))})}c("#tribe-events").on("click",".tribe-events-nav-previous, .tribe-events-nav-next",function(a){if(a.preventDefault(),!g.ajax_running){var b=c(this).find("a");g.date=b.data("month"),g.mdate=g.date+"-01","0"!==g.datepicker_format?f.update_picker(tribeDateFormat(g.mdate,z)):f.update_picker(g.date),g.filter_cats?d.cur_url=c("#tribe-events-header").data("baseurl"):d.cur_url=b.attr("href"),d.default_permalinks&&(d.cur_url=d.cur_url.split("?")[0]),g.popping=!1,f.pre_ajax(function(){p()})}}).on("click","td.tribe-events-thismonth a",function(a){a.stopPropagation()}).on("click",'[id*="tribe-events-daynum-"] a',function(a){if(q.is(".tribe-mobile")){a.preventDefault();var b=c(this).closest(".mobile-trigger");k(b)}}).on("click",".mobile-trigger",function(a){q.is(".tribe-mobile")&&(a.preventDefault(),a.stopPropagation(),k(c(this)))}),f.snap("#tribe-bar-form","body","#tribe-events-footer .tribe-events-nav-previous, #tribe-events-footer .tribe-events-nav-next"),c("form#tribe-bar-form").on("submit",function(a){o(a)}),c(e).on("tribe_ev_runAjax",function(){p()}),c(e).on("tribe_ev_updatingRecurrence",function(){g.date=c("#tribe-events-header").data("date"),g.filter_cats?d.cur_url=c("#tribe-events-header").data("baseurl")+g.date+"/":d.default_permalinks?d.cur_url=w:d.cur_url=w+g.date+"/",g.popping=!1})})}(window,document,jQuery,tribe_ev.data,tribe_ev.events,tribe_ev.fn,tribe_ev.state,tribe_ev.tests,tribe_js_config,tribe_debug);
1
+ !function(a,b,c,d,e,f,g,h,i,j){c(b).ready(function(){function j(a){var b=c('.tribe-mobile-day[data-day="'+a+'"]'),d=c('.tribe-events-calendar td[data-day="'+a+'"]'),e=d.find(".tribe-events-viewmore"),f=d.find(".type-tribe_events");f.length&&(f.each(function(){var a=c(this);if(a.tribe_has_attr("data-tribejson")){var d=a.data("tribejson");b.append(tribe_tmpl("tribe_tmpl_month_mobile",d))}}),e.length&&b.append(e.clone()))}function k(a){var b=a.data("tribejson");b.date=a.attr("data-day");var c=a.parents(".tribe-events-calendar"),d=c.next("#tribe-mobile-container"),e=d.find(".tribe-mobile-day"),f=c.find(".mobile-trigger"),g='[data-day="'+b.date+'"]',h=e.filter(g);b.has_events=a.hasClass("tribe-events-has-events"),f.removeClass("mobile-active").filter(g).addClass("mobile-active"),e.hide(),h.length?h.show():(d.append(tribe_tmpl("tribe_tmpl_month_mobile_day_header",b)),j(b.date))}function l(){var a=t.find(".tribe-events-present"),d=t.find(".mobile-trigger"),e=t.find(b.getElementById("tribe-events-content")).find(".tribe-events-calendar");if(c("#tribe-mobile-container").length||c('<div id="tribe-mobile-container" />').insertAfter(e),a.length&&a.is(".tribe-events-thismonth"))k(a);else{var f=d.filter(".tribe-events-thismonth").first();k(f)}}function m(){t.find(".tribe-events-calendar th").each(function(){var a=c(this),b=a.attr("data-day-abbr"),d=a.attr("title");q.is(".tribe-mobile")?a.text(b):a.text(d)})}function n(a){q.is(".tribe-mobile")?(m(),l()):a&&m()}function o(a){if("change_view"!=tribe_events_bar_action){if(a.preventDefault(),g.ajax_running)return;u.val().length?"0"!==g.datepicker_format?g.date=tribeDateFormat(u.bootstrapDatepicker("getDate"),"tribeMonthQuery"):g.date=u.val():v||(g.date=d.cur_date.slice(0,-3)),g.filter_cats?d.cur_url=c("#tribe-events-header").data("baseurl")+g.date+"/":d.default_permalinks?d.cur_url=w:d.cur_url=w+g.date+"/",g.popping=!1,f.pre_ajax(function(){p()})}}function p(){f.invalid_date(g.date)||(c(".tribe-events-calendar").tribe_spin(),g.pushcount=0,g.ajax_running=!0,g.popping||(g.params={action:"tribe_calendar",eventDate:g.date},g.url_params={},g.category&&(g.params.tribe_event_category=g.category,g.url_params.tribe_events_cat=g.category),d.default_permalinks&&(g.url_params.hasOwnProperty("post_type")||(g.url_params.post_type=i.events_post_type),g.url_params.hasOwnProperty("eventDisplay")||(g.url_params.eventDisplay=g.view)),c(e).trigger("tribe_ev_serializeBar"),g.params=c.param(g.params),g.url_params=c.param(g.url_params),c(e).trigger("tribe_ev_collectParams"),g.pushcount>0||g.filters||d.default_permalinks||g.category?(g.do_string=!0,g.pushstate=!1):(g.do_string=!1,g.pushstate=!0)),h.pushstate&&!g.filter_cats?(c(e).trigger("tribe_ev_ajaxStart").trigger("tribe_ev_monthView_AjaxStart"),c.post(TribeCalendar.ajaxurl,g.params,function(a){if(g.initial_load=!1,f.enable_inputs("#tribe_events_filters_form","input, select"),a.success){g.ajax_running=!1,d.ajax_response={total_count:"",view:a.view,max_pages:"",tribe_paged:"",timestamp:(new Date).getTime()};var h="";h=c.isFunction(c.fn.parseHTML)?c.parseHTML(a.html):a.html,c("#tribe-events-content").replaceWith(h),n(!0),g.page_title=c("#tribe-events-header").data("title"),b.title=g.page_title,g.do_string&&(d.cur_url=d.cur_url+"?"+g.url_params,history.pushState({tribe_date:g.date,tribe_params:g.params},g.page_title,d.cur_url)),g.pushstate&&history.pushState({tribe_date:g.date,tribe_params:g.params},g.page_title,d.cur_url),c(e).trigger("tribe_ev_ajaxSuccess").trigger("tribe_ev_monthView_ajaxSuccess")}})):g.url_params.length?a.location=d.cur_url+"?"+g.url_params:a.location=d.cur_url)}var q=c("body"),r=c('[class^="tribe-events-nav-"] a'),s=f.get_url_param("tribe-bar-date"),t=c("#tribe-events"),u=c("#tribe-bar-date"),v=!1,w="/";"undefined"!=typeof i.events_base?w=i.events_base:r.length&&(w=r.first().attr("href").slice(0,-8)),d.default_permalinks&&(w=w.split("?")[0]),c(".tribe-events-calendar").length&&c("#tribe-events-bar").length&&s&&s.length>7&&(c("#tribe-bar-date-day").val(s.slice(-3)),u.val(s.substring(0,7)));var x="yyyy-mm";if("0"!==g.datepicker_format){var y=parseInt(g.datepicker_format),z="m"+g.datepicker_format.toString();x=d.datepicker_formats.month[y],s&&(s.length<=7&&(s+="-01"),u.val(tribeDateFormat(s,z)))}if(d.datepicker_opts={format:x,minViewMode:"months",autoclose:!0},u.bootstrapDatepicker(d.datepicker_opts).on("changeDate",function(a){g.mdate=a.date;var b=a.date.getFullYear(),e=("0"+(a.date.getMonth()+1)).slice(-2);if(v=!0,g.date=b+"-"+e,h.no_bar()||h.live_ajax()&&h.pushstate){if(g.ajax_running||g.updating_picker)return;g.filter_cats?d.cur_url=c("#tribe-events-header").data("baseurl")+g.date+"/":d.default_permalinks?d.cur_url=w:d.cur_url=w+g.date+"/",g.popping=!1,f.pre_ajax(function(){p()})}}),n(!0),c(e).on("tribe_ev_resizeComplete",function(){n(!0)}),h.pushstate&&!h.map_view()){var A="action=tribe_calendar&eventDate="+c("#tribe-events-header").data("date");d.params.length&&(A=A+"&"+d.params),g.category&&(A=A+"&tribe_event_category="+g.category),history.replaceState({tribe_params:A},g.page_title,location.href),c(a).on("popstate",function(a){var b=a.originalEvent.state;b&&(g.do_string=!1,g.pushstate=!1,g.popping=!0,g.params=b.tribe_params,f.pre_ajax(function(){p()}),f.set_form(g.params))})}c("#tribe-events").on("click",".tribe-events-nav-previous, .tribe-events-nav-next",function(a){if(a.preventDefault(),!g.ajax_running){var b=c(this).find("a");g.date=b.data("month"),g.mdate=g.date+"-01","0"!==g.datepicker_format?f.update_picker(tribeDateFormat(g.mdate,z)):f.update_picker(g.date),g.filter_cats?d.cur_url=c("#tribe-events-header").data("baseurl"):d.cur_url=b.attr("href"),d.default_permalinks&&(d.cur_url=d.cur_url.split("?")[0]),g.popping=!1,f.pre_ajax(function(){p()})}}).on("click","td.tribe-events-thismonth a",function(a){a.stopPropagation()}).on("click",'[id*="tribe-events-daynum-"] a',function(a){if(q.is(".tribe-mobile")){a.preventDefault();var b=c(this).closest(".mobile-trigger");k(b)}}).on("click",".mobile-trigger",function(a){q.is(".tribe-mobile")&&(a.preventDefault(),a.stopPropagation(),k(c(this)))}),f.snap("#tribe-bar-form","body","#tribe-events-footer .tribe-events-nav-previous, #tribe-events-footer .tribe-events-nav-next"),c("form#tribe-bar-form").on("submit",function(a){o(a)}),c(e).on("tribe_ev_runAjax",function(){p()}),c(e).on("tribe_ev_updatingRecurrence",function(){g.date=c("#tribe-events-header").data("date"),g.filter_cats?d.cur_url=c("#tribe-events-header").data("baseurl")+g.date+"/":d.default_permalinks?d.cur_url=w:d.cur_url=w+g.date+"/",g.popping=!1})})}(window,document,jQuery,tribe_ev.data,tribe_ev.events,tribe_ev.fn,tribe_ev.state,tribe_ev.tests,tribe_js_config,tribe_debug);
src/views/list/single-event.php CHANGED
@@ -66,7 +66,7 @@ $organizer = tribe_get_organizer();
66
<!-- Event Content -->
67
<?php do_action( 'tribe_events_before_the_content' ) ?>
68
<div class="tribe-events-list-event-description tribe-events-content">
69
- <?php echo tribe_events_get_the_excerpt(); ?>
70
<a href="<?php echo esc_url( tribe_get_event_link() ); ?>" class="tribe-events-read-more" rel="bookmark"><?php esc_html_e( 'Find out more', 'the-events-calendar' ) ?> &raquo;</a>
71
</div><!-- .tribe-events-list-event-description -->
72
<?php
66
<!-- Event Content -->
67
<?php do_action( 'tribe_events_before_the_content' ) ?>
68
<div class="tribe-events-list-event-description tribe-events-content">
69
+ <?php echo tribe_events_get_the_excerpt( null, wp_kses_allowed_html( 'post' ) ); ?>
70
<a href="<?php echo esc_url( tribe_get_event_link() ); ?>" class="tribe-events-read-more" rel="bookmark"><?php esc_html_e( 'Find out more', 'the-events-calendar' ) ?> &raquo;</a>
71
</div><!-- .tribe-events-list-event-description -->
72
<?php
src/views/modules/meta/details.php CHANGED
@@ -64,7 +64,7 @@ $website = tribe_get_event_website_link();
64
65
<dt> <?php esc_html_e( 'Start:', 'the-events-calendar' ) ?> </dt>
66
<dd>
67
- <abbr class="tribe-events-abbr updated published dtstart" title="<?php esc_attr_e( $start_ts ) ?>"> <?php esc_html_e( $start_date ) ?> </abbr>
68
</dd>
69
70
<dt> <?php esc_html_e( 'End:', 'the-events-calendar' ) ?> </dt>
@@ -79,7 +79,7 @@ $website = tribe_get_event_website_link();
79
80
<dt> <?php esc_html_e( 'Date:', 'the-events-calendar' ) ?> </dt>
81
<dd>
82
- <abbr class="tribe-events-abbr updated published dtstart" title="<?php esc_attr_e( $start_ts ) ?>"> <?php esc_html_e( $start_date ) ?> </abbr>
83
</dd>
84
85
<?php
@@ -104,13 +104,15 @@ $website = tribe_get_event_website_link();
104
105
<dt> <?php esc_html_e( 'Date:', 'the-events-calendar' ) ?> </dt>
106
<dd>
107
- <abbr class="tribe-events-abbr updated published dtstart" title="<?php esc_attr_e( $start_ts ) ?>"> <?php esc_html_e( $start_date ) ?> </abbr>
108
</dd>
109
110
<dt> <?php echo esc_html( $time_title ); ?> </dt>
111
- <dd><div class="tribe-events-abbr updated published dtstart" title="<?php esc_attr_e( $end_ts ) ?>">
112
<?php echo $time_formatted; ?>
113
- </div></dd>
114
115
<?php endif ?>
116
64
65
<dt> <?php esc_html_e( 'Start:', 'the-events-calendar' ) ?> </dt>
66
<dd>
67
+ <abbr class="tribe-events-abbr tribe-events-start-datetime published dtstart" title="<?php esc_attr_e( $start_ts ) ?>"> <?php esc_html_e( $start_date ) ?> </abbr>
68
</dd>
69
70
<dt> <?php esc_html_e( 'End:', 'the-events-calendar' ) ?> </dt>
79
80
<dt> <?php esc_html_e( 'Date:', 'the-events-calendar' ) ?> </dt>
81
<dd>
82
+ <abbr class="tribe-events-abbr tribe-events-start-datetime published dtstart" title="<?php esc_attr_e( $start_ts ) ?>"> <?php esc_html_e( $start_date ) ?> </abbr>
83
</dd>
84
85
<?php
104
105
<dt> <?php esc_html_e( 'Date:', 'the-events-calendar' ) ?> </dt>
106
<dd>
107
+ <abbr class="tribe-events-abbr tribe-events-start-date published dtstart" title="<?php esc_attr_e( $start_ts ) ?>"> <?php esc_html_e( $start_date ) ?> </abbr>
108
</dd>
109
110
<dt> <?php echo esc_html( $time_title ); ?> </dt>
111
+ <dd>
112
+ <div class="tribe-events-abbr tribe-events-start-time published dtstart" title="<?php esc_attr_e( $end_ts ) ?>">
113
<?php echo $time_formatted; ?>
114
+ </div>
115
+ </dd>
116
117
<?php endif ?>
118
src/views/modules/meta/organizer.php CHANGED
@@ -28,8 +28,9 @@ $website = tribe_get_organizer_website_link();
28
}
29
30
?>
31
<dd class="tribe-organizer">
32
- <?php echo tribe_get_organizer( $organizer ) ?>
33
</dd>
34
<?php
35
}
28
}
29
30
?>
31
+ <dt style="display:none;"><?php // This element is just to make sure we have a valid HTML ?></dt>
32
<dd class="tribe-organizer">
33
+ <?php echo tribe_get_organizer_link( $organizer ) ?>
34
</dd>
35
<?php
36
}
src/views/month/tooltip.php CHANGED
@@ -10,7 +10,7 @@
10
11
<script type="text/html" id="tribe_tmpl_tooltip">
12
<div id="tribe-events-tooltip-[[=eventId]]" class="tribe-events-tooltip">
13
- <h4 class="entry-title summary">[[=title]]</h4>
14
15
<div class="tribe-events-event-body">
16
<div class="tribe-event-duration">
10
11
<script type="text/html" id="tribe_tmpl_tooltip">
12
<div id="tribe-events-tooltip-[[=eventId]]" class="tribe-events-tooltip">
13
+ <h4 class="entry-title summary">[[=raw title]]</h4>
14
15
<div class="tribe-events-event-body">
16
<div class="tribe-event-duration">
the-events-calendar.php CHANGED
@@ -2,7 +2,7 @@
2
/*
3
Plugin Name: The Events Calendar
4
Description: The Events Calendar is a carefully crafted, extensible plugin that lets you easily share your events. Beautiful. Solid. Awesome.
5
- Version: 4.0.5
6
Author: Modern Tribe, Inc.
7
Author URI: http://m.tri.be/1x
8
Text Domain: the-events-calendar
2
/*
3
Plugin Name: The Events Calendar
4
Description: The Events Calendar is a carefully crafted, extensible plugin that lets you easily share your events. Beautiful. Solid. Awesome.
5
+ Version: 4.0.6
6
Author: Modern Tribe, Inc.
7
Author URI: http://m.tri.be/1x
8
Text Domain: the-events-calendar