Version Description
- Ensured that rewrite rules are flushed upon plugin activation so event pages do not 404
- Fixed a bug that caused JavaScript-generated event pagination URLs to be malformed during day/month browsing when pagination anchor tags are absent from the page
- Fixed a style bug where save/update notices for events in the dashboard had a colored border
Download this release
Release Info
Developer | jazbek |
Plugin | The Events Calendar |
Version | 3.9.3 |
Comparing to | |
See all releases |
Code changes from version 3.9.2 to 3.9.3
- lib/the-events-calendar.class.php +32 -34
- lib/tribe-template-factory.class.php +7 -4
- readme.txt +9 -2
- resources/events-admin.css +1 -2
- resources/tribe-events-ajax-calendar.js +5 -2
- resources/tribe-events-ajax-calendar.min.js +1 -1
- resources/tribe-events-ajax-day.js +5 -3
- resources/tribe-events-ajax-day.min.js +1 -1
- the-events-calendar.php +3 -3
lib/the-events-calendar.class.php
CHANGED
@@ -24,7 +24,7 @@ if ( ! class_exists( 'TribeEvents' ) ) {
|
|
24 |
const VENUE_POST_TYPE = 'tribe_venue';
|
25 |
const ORGANIZER_POST_TYPE = 'tribe_organizer';
|
26 |
|
27 |
-
const VERSION = '3.9.
|
28 |
const FEED_URL = 'http://tri.be/category/products/feed/';
|
29 |
const INFO_API_URL = 'http://wpapi.org/api/plugin/the-events-calendar.php';
|
30 |
const WP_PLUGIN_URL = 'http://wordpress.org/extend/plugins/the-events-calendar/';
|
@@ -678,35 +678,42 @@ if ( ! class_exists( 'TribeEvents' ) ) {
|
|
678 |
* @return void
|
679 |
*/
|
680 |
public function checkAddOnCompatibility() {
|
|
|
681 |
// Variable for storing output to admin notices.
|
682 |
$output = '';
|
|
|
683 |
// Array to store any plugins that are out of date.
|
684 |
-
$
|
|
|
685 |
// Array to store all addons and their required CORE versions.
|
686 |
$tec_addons_required_versions = array();
|
687 |
-
|
688 |
-
$out_of_date_addons = array();
|
689 |
// Is Core the thing that is out of date?
|
690 |
$tec_out_of_date = false;
|
691 |
|
692 |
// Get the addon information.
|
693 |
$tec_addons_required_versions = (array) apply_filters( 'tribe_tec_addons', $tec_addons_required_versions );
|
|
|
694 |
// Foreach addon, make sure that it is compatible with current version of core.
|
695 |
foreach ( $tec_addons_required_versions as $plugin ) {
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
}
|
700 |
-
if ( ( isset( $plugin['plugin_dir_file'] ) ) ) {
|
701 |
-
$addon_short_path = $plugin['plugin_dir_file'];
|
702 |
-
} else {
|
703 |
-
$addon_short_path = null;
|
704 |
-
}
|
705 |
}
|
706 |
-
|
|
|
707 |
if ( version_compare( $plugin['required_version'], self::VERSION, '>' ) ) {
|
708 |
$tec_out_of_date = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
709 |
}
|
|
|
710 |
}
|
711 |
// If Core is out of date, generate the proper message.
|
712 |
if ( $tec_out_of_date == true ) {
|
@@ -722,27 +729,18 @@ if ( ! class_exists( 'TribeEvents' ) ) {
|
|
722 |
$output .= '<div class="error">';
|
723 |
$output .= '<p>' . sprintf( __( 'Your version of The Events Calendar is not up-to-date with one of your The Events Calendar add-ons. Please %supdate now.%s', 'tribe-events-calendar' ), '<a href="' . esc_url( $upgrade_path ) . '">', '</a>' ) . '</p>';
|
724 |
$output .= '</div>';
|
725 |
-
}
|
726 |
// Otherwise, if the addons are out of date, generate the proper messaging.
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
array(
|
738 |
-
'utm_campaign' => 'in-app',
|
739 |
-
'utm_medium' => 'plugin-tec',
|
740 |
-
'utm_source' => 'notice'
|
741 |
-
), self::$tribeUrl . 'version-relationships-in-modern-tribe-pluginsadd-ons/'
|
742 |
-
);
|
743 |
-
$output .= '<p>' . sprintf( __( 'The following plugins are out of date: <b>%s</b>. All add-ons contain dependencies on The Events Calendar and will not function properly unless paired with the right version. %sLearn More%s.', 'tribe-events-calendar' ), join( $out_of_date_addons, ', ' ), "<a href='" . esc_url( $link ) . "' target='_blank'>", '</a>' ) . '</p>';
|
744 |
-
$output .= '</div>';
|
745 |
-
}
|
746 |
}
|
747 |
// Make sure only to show the message if the user has the permissions necessary.
|
748 |
if ( current_user_can( 'edit_plugins' ) ) {
|
24 |
const VENUE_POST_TYPE = 'tribe_venue';
|
25 |
const ORGANIZER_POST_TYPE = 'tribe_organizer';
|
26 |
|
27 |
+
const VERSION = '3.9.3';
|
28 |
const FEED_URL = 'http://tri.be/category/products/feed/';
|
29 |
const INFO_API_URL = 'http://wpapi.org/api/plugin/the-events-calendar.php';
|
30 |
const WP_PLUGIN_URL = 'http://wordpress.org/extend/plugins/the-events-calendar/';
|
678 |
* @return void
|
679 |
*/
|
680 |
public function checkAddOnCompatibility() {
|
681 |
+
|
682 |
// Variable for storing output to admin notices.
|
683 |
$output = '';
|
684 |
+
|
685 |
// Array to store any plugins that are out of date.
|
686 |
+
$out_of_date_addons = array();
|
687 |
+
|
688 |
// Array to store all addons and their required CORE versions.
|
689 |
$tec_addons_required_versions = array();
|
690 |
+
|
|
|
691 |
// Is Core the thing that is out of date?
|
692 |
$tec_out_of_date = false;
|
693 |
|
694 |
// Get the addon information.
|
695 |
$tec_addons_required_versions = (array) apply_filters( 'tribe_tec_addons', $tec_addons_required_versions );
|
696 |
+
|
697 |
// Foreach addon, make sure that it is compatible with current version of core.
|
698 |
foreach ( $tec_addons_required_versions as $plugin ) {
|
699 |
+
// we're not going to check addons that we can't
|
700 |
+
if ( empty( $plugin['required_version'] ) || empty( $plugin['current_version'] ) ) {
|
701 |
+
continue;
|
|
|
|
|
|
|
|
|
|
|
|
|
702 |
}
|
703 |
+
|
704 |
+
// check if TEC is out of date
|
705 |
if ( version_compare( $plugin['required_version'], self::VERSION, '>' ) ) {
|
706 |
$tec_out_of_date = true;
|
707 |
+
break;
|
708 |
+
}
|
709 |
+
|
710 |
+
// check if addons are at an older minor version
|
711 |
+
$addon_minor_version = (float) $plugin['current_version'];
|
712 |
+
$tec_minor_version = (float) self::VERSION;
|
713 |
+
if ( version_compare( $addon_minor_version, $tec_minor_version, '<' ) ) {
|
714 |
+
$out_of_date_addons[] = $plugin['plugin_name'] . ' ' . $plugin['current_version'];
|
715 |
}
|
716 |
+
|
717 |
}
|
718 |
// If Core is out of date, generate the proper message.
|
719 |
if ( $tec_out_of_date == true ) {
|
729 |
$output .= '<div class="error">';
|
730 |
$output .= '<p>' . sprintf( __( 'Your version of The Events Calendar is not up-to-date with one of your The Events Calendar add-ons. Please %supdate now.%s', 'tribe-events-calendar' ), '<a href="' . esc_url( $upgrade_path ) . '">', '</a>' ) . '</p>';
|
731 |
$output .= '</div>';
|
732 |
+
} elseif ( ! empty( $out_of_date_addons ) ) {
|
733 |
// Otherwise, if the addons are out of date, generate the proper messaging.
|
734 |
+
$output .= '<div class="error">';
|
735 |
+
$link = add_query_arg(
|
736 |
+
array(
|
737 |
+
'utm_campaign' => 'in-app',
|
738 |
+
'utm_medium' => 'plugin-tec',
|
739 |
+
'utm_source' => 'notice'
|
740 |
+
), self::$tribeUrl . 'version-relationships-in-modern-tribe-pluginsadd-ons/'
|
741 |
+
);
|
742 |
+
$output .= '<p>' . sprintf( __( 'The following plugins are out of date: <b>%s</b>. All add-ons contain dependencies on The Events Calendar and will not function properly unless paired with the right version. %sLearn More%s.', 'tribe-events-calendar' ), join( $out_of_date_addons, ', ' ), "<a href='" . esc_url( $link ) . "' target='_blank'>", '</a>' ) . '</p>';
|
743 |
+
$output .= '</div>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
744 |
}
|
745 |
// Make sure only to show the message if the user has the permissions necessary.
|
746 |
if ( current_user_can( 'edit_plugins' ) ) {
|
lib/tribe-template-factory.class.php
CHANGED
@@ -554,7 +554,8 @@ if ( ! class_exists( 'Tribe_Template_Factory' ) ) {
|
|
554 |
wp_enqueue_script( $prefix . '-calendar-script', $path, $deps, apply_filters( 'tribe_events_js_version', TribeEvents::VERSION ) );
|
555 |
$js_config_array = array(
|
556 |
'permalink_settings' => get_option( 'permalink_structure' ),
|
557 |
-
'events_post_type' => TribeEvents::POSTTYPE
|
|
|
558 |
);
|
559 |
wp_localize_script( $prefix . '-calendar-script', 'tribe_js_config', $js_config_array );
|
560 |
break;
|
@@ -631,7 +632,9 @@ if ( ! class_exists( 'Tribe_Template_Factory' ) ) {
|
|
631 |
$prefix . '-calendar-script'
|
632 |
)
|
633 |
);
|
634 |
-
$ajax_data = array(
|
|
|
|
|
635 |
$path = self::getMinFile( $resources_url . 'tribe-events-ajax-calendar.js', true );
|
636 |
wp_enqueue_script( 'tribe-events-calendar', $path, $deps, apply_filters( 'tribe_events_js_version', TribeEvents::VERSION ), true );
|
637 |
wp_localize_script( 'tribe-events-calendar', 'TribeCalendar', $ajax_data );
|
@@ -641,7 +644,7 @@ if ( ! class_exists( 'Tribe_Template_Factory' ) ) {
|
|
641 |
$tribe_paged = ( ! empty( $_REQUEST['tribe_paged'] ) ) ? $_REQUEST['tribe_paged'] : 0;
|
642 |
$ajax_data = array(
|
643 |
"ajaxurl" => admin_url( 'admin-ajax.php', ( is_ssl() ? 'https' : 'http' ) ),
|
644 |
-
'tribe_paged' => $tribe_paged
|
645 |
);
|
646 |
$path = self::getMinFile( $resources_url . 'tribe-events-ajax-list.js', true );
|
647 |
wp_enqueue_script( 'tribe-events-list', $path, $deps, apply_filters( 'tribe_events_js_version', TribeEvents::VERSION ), true );
|
@@ -650,7 +653,7 @@ if ( ! class_exists( 'Tribe_Template_Factory' ) ) {
|
|
650 |
case 'ajax-dayview':
|
651 |
$ajax_data = array(
|
652 |
"ajaxurl" => admin_url( 'admin-ajax.php', ( is_ssl() ? 'https' : 'http' ) ),
|
653 |
-
'post_type' => TribeEvents::POSTTYPE
|
654 |
);
|
655 |
$path = self::getMinFile( $resources_url . 'tribe-events-ajax-day.js', true );
|
656 |
wp_enqueue_script( 'tribe-events-ajax-day', $path, array( 'tribe-events-bar' ), apply_filters( 'tribe_events_js_version', TribeEvents::VERSION ), true );
|
554 |
wp_enqueue_script( $prefix . '-calendar-script', $path, $deps, apply_filters( 'tribe_events_js_version', TribeEvents::VERSION ) );
|
555 |
$js_config_array = array(
|
556 |
'permalink_settings' => get_option( 'permalink_structure' ),
|
557 |
+
'events_post_type' => TribeEvents::POSTTYPE,
|
558 |
+
'events_base' => tribe_get_events_link(),
|
559 |
);
|
560 |
wp_localize_script( $prefix . '-calendar-script', 'tribe_js_config', $js_config_array );
|
561 |
break;
|
632 |
$prefix . '-calendar-script'
|
633 |
)
|
634 |
);
|
635 |
+
$ajax_data = array(
|
636 |
+
"ajaxurl" => admin_url( 'admin-ajax.php', ( is_ssl() ? 'https' : 'http' ) ),
|
637 |
+
);
|
638 |
$path = self::getMinFile( $resources_url . 'tribe-events-ajax-calendar.js', true );
|
639 |
wp_enqueue_script( 'tribe-events-calendar', $path, $deps, apply_filters( 'tribe_events_js_version', TribeEvents::VERSION ), true );
|
640 |
wp_localize_script( 'tribe-events-calendar', 'TribeCalendar', $ajax_data );
|
644 |
$tribe_paged = ( ! empty( $_REQUEST['tribe_paged'] ) ) ? $_REQUEST['tribe_paged'] : 0;
|
645 |
$ajax_data = array(
|
646 |
"ajaxurl" => admin_url( 'admin-ajax.php', ( is_ssl() ? 'https' : 'http' ) ),
|
647 |
+
'tribe_paged' => $tribe_paged,
|
648 |
);
|
649 |
$path = self::getMinFile( $resources_url . 'tribe-events-ajax-list.js', true );
|
650 |
wp_enqueue_script( 'tribe-events-list', $path, $deps, apply_filters( 'tribe_events_js_version', TribeEvents::VERSION ), true );
|
653 |
case 'ajax-dayview':
|
654 |
$ajax_data = array(
|
655 |
"ajaxurl" => admin_url( 'admin-ajax.php', ( is_ssl() ? 'https' : 'http' ) ),
|
656 |
+
'post_type' => TribeEvents::POSTTYPE,
|
657 |
);
|
658 |
$path = self::getMinFile( $resources_url . 'tribe-events-ajax-day.js', true );
|
659 |
wp_enqueue_script( 'tribe-events-ajax-day', $path, array( 'tribe-events-bar' ), apply_filters( 'tribe_events_js_version', TribeEvents::VERSION ), true );
|
readme.txt
CHANGED
@@ -4,8 +4,8 @@ Contributors: ModernTribe, roblagatta, faction23, jazbek, jbrinley, leahkoerper
|
|
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.
|
8 |
-
Stable tag: 3.9.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -218,6 +218,7 @@ The plugin is produced by <a href="http://m.tri.be/2s">Modern Tribe Inc</a>.
|
|
218 |
* <a href="http://profiles.wordpress.org/users/peterchester">Peter Chester</a>
|
219 |
* <a href="http://profiles.wordpress.org/users/reid.peifer">Reid Peifer</a>
|
220 |
* <a href="http://profiles.wordpress.org/users/shane.pearlman">Shane Pearlman</a>
|
|
|
221 |
|
222 |
= Past Contributors =
|
223 |
|
@@ -325,6 +326,12 @@ At no point during the 3.0 lifecycle will the major version change. But you can
|
|
325 |
|
326 |
3.x is a complete overhaul of the plugin, and as a result we're starting the changelog fresh. For release notes from the 2.x lifecycle, see <a href="http://m.tri.be/k">our 2.x release notes.</a>
|
327 |
|
|
|
|
|
|
|
|
|
|
|
|
|
328 |
= 3.9.2 =
|
329 |
|
330 |
* Hardened URL output to protect against XSS attacks.
|
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.2
|
8 |
+
Stable tag: 3.9.3
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
218 |
* <a href="http://profiles.wordpress.org/users/peterchester">Peter Chester</a>
|
219 |
* <a href="http://profiles.wordpress.org/users/reid.peifer">Reid Peifer</a>
|
220 |
* <a href="http://profiles.wordpress.org/users/shane.pearlman">Shane Pearlman</a>
|
221 |
+
* <a href="http://profiles.wordpress.org/users/borkweb">Matthew Batchelder</a>
|
222 |
|
223 |
= Past Contributors =
|
224 |
|
326 |
|
327 |
3.x is a complete overhaul of the plugin, and as a result we're starting the changelog fresh. For release notes from the 2.x lifecycle, see <a href="http://m.tri.be/k">our 2.x release notes.</a>
|
328 |
|
329 |
+
= 3.9.3 =
|
330 |
+
|
331 |
+
* Ensured that rewrite rules are flushed upon plugin activation so event pages do not 404
|
332 |
+
* Fixed a bug that caused JavaScript-generated event pagination URLs to be malformed during day/month browsing when pagination anchor tags are absent from the page
|
333 |
+
* Fixed a style bug where save/update notices for events in the dashboard had a colored border
|
334 |
+
|
335 |
= 3.9.2 =
|
336 |
|
337 |
* Hardened URL output to protect against XSS attacks.
|
resources/events-admin.css
CHANGED
@@ -16,7 +16,6 @@ input::-webkit-input-placeholder, textarea::-webkit-input-placeholder { color: #
|
|
16 |
|
17 |
/* = Post Type Editing
|
18 |
=============================================*/
|
19 |
-
.notice {background-color: rgb(255, 255, 224); border: 1px solid rgb(230, 219, 85); margin: 5px 0 15px;}
|
20 |
.bubble {border-color:#dfdfdf; border-width:1px; border-style:solid; -moz-border-radius:3px; -khtml-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; padding: 10px; border-style:solid; border-spacing:0; background-color:#F9F9F9;}
|
21 |
|
22 |
.eventForm {margin-top: -20px;}
|
@@ -383,4 +382,4 @@ a.tribe-rating-link {
|
|
383 |
input[type='email'] {
|
384 |
width:100%;
|
385 |
}
|
386 |
-
}
|
16 |
|
17 |
/* = Post Type Editing
|
18 |
=============================================*/
|
|
|
19 |
.bubble {border-color:#dfdfdf; border-width:1px; border-style:solid; -moz-border-radius:3px; -khtml-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; padding: 10px; border-style:solid; border-spacing:0; background-color:#F9F9F9;}
|
20 |
|
21 |
.eventForm {margin-top: -20px;}
|
382 |
input[type='email'] {
|
383 |
width:100%;
|
384 |
}
|
385 |
+
}
|
resources/tribe-events-ajax-calendar.js
CHANGED
@@ -20,12 +20,15 @@
|
|
20 |
|
21 |
var $body = $( 'body' ),
|
22 |
$nav_link = $( '[class^="tribe-events-nav-"] a' ),
|
23 |
-
base_url = '/',
|
24 |
initial_date = tf.get_url_param( 'tribe-bar-date' ),
|
25 |
$tribedate = $( '#tribe-bar-date' ),
|
26 |
date_mod = false;
|
27 |
|
28 |
-
|
|
|
|
|
|
|
|
|
29 |
base_url = $nav_link.first().attr( 'href' ).slice( 0, -8 );
|
30 |
}
|
31 |
|
20 |
|
21 |
var $body = $( 'body' ),
|
22 |
$nav_link = $( '[class^="tribe-events-nav-"] a' ),
|
|
|
23 |
initial_date = tf.get_url_param( 'tribe-bar-date' ),
|
24 |
$tribedate = $( '#tribe-bar-date' ),
|
25 |
date_mod = false;
|
26 |
|
27 |
+
var base_url = '/';
|
28 |
+
|
29 |
+
if ( 'undefined' !== typeof config.events_base ) {
|
30 |
+
base_url = config.events_base;
|
31 |
+
} else if ( $nav_link.length ) {
|
32 |
base_url = $nav_link.first().attr( 'href' ).slice( 0, -8 );
|
33 |
}
|
34 |
|
resources/tribe-events-ajax-calendar.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(a,b,c,d,e,f,g,h,i){c(b).ready(function(){function j(a){var b=a;10>a&&(b="0"+a);var d=c('.tribe-mobile-day[data-day="'+a+'"]'),e=c(".tribe-event-day-"+b+" .tribe-events-viewmore"),f=c(".tribe-event-day-"+b+" .hentry");f.length&&(f.each(function(){var a=c(this);if(a.tribe_has_attr("data-tribejson")){var b=a.data("tribejson");d.append(tribe_tmpl("tribe_tmpl_month_mobile",b))}}),e.length&&d.append(e.clone()))}function k(a,b){var d=c("#tribe-mobile-container"),e=c(".tribe-mobile-day"),f=c(".mobile-trigger"),g=c('.tribe-mobile-day[data-day="'+a+'"]'),h="undefined"==typeof b?"":b,i={date:a,date_name:h};f.removeClass("mobile-active");var k=h.length?'[data-date-name="'+h+'"]':'.tribe-events-thismonth[data-day="'+a+'"]';f.filter(k).addClass("mobile-active"),e.hide(),g.length?g.show():(d.append(tribe_tmpl("tribe_tmpl_month_mobile_day_header",i)),j(a))}function l(){var a=c(".tribe-events-present"),b=c(".mobile-trigger"),d=c("#tribe-events-content > .tribe-events-calendar");if(c("#tribe-mobile-container").length||c('<div id="tribe-mobile-container" />').insertAfter(d),a.length)k(a.attr("data-day"),a.attr("data-date-name"));else{var e=b.filter(".tribe-events-thismonth").first();k(e.attr("data-day"),e.attr("data-date-name"))}}function m(){c(".tribe-events-calendar th").each(function(){var a=c(this),b=a.attr("data-day-abbr"),d=a.attr("title");a.text(q.is(".tribe-mobile")?b: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;
|
1 |
+
!function(a,b,c,d,e,f,g,h,i,j){c(b).ready(function(){function j(a){var b=a;10>a&&(b="0"+a);var d=c('.tribe-mobile-day[data-day="'+a+'"]'),e=c(".tribe-event-day-"+b+" .tribe-events-viewmore"),f=c(".tribe-event-day-"+b+" .hentry");f.length&&(f.each(function(){var a=c(this);if(a.tribe_has_attr("data-tribejson")){var b=a.data("tribejson");d.append(tribe_tmpl("tribe_tmpl_month_mobile",b))}}),e.length&&d.append(e.clone()))}function k(a,b){var d=c("#tribe-mobile-container"),e=c(".tribe-mobile-day"),f=c(".mobile-trigger"),g=c('.tribe-mobile-day[data-day="'+a+'"]'),h="undefined"==typeof b?"":b,i={date:a,date_name:h};f.removeClass("mobile-active");var k=h.length?'[data-date-name="'+h+'"]':'.tribe-events-thismonth[data-day="'+a+'"]';f.filter(k).addClass("mobile-active"),e.hide(),g.length?g.show():(d.append(tribe_tmpl("tribe_tmpl_month_mobile_day_header",i)),j(a))}function l(){var a=c(".tribe-events-present"),b=c(".mobile-trigger"),d=c("#tribe-events-content > .tribe-events-calendar");if(c("#tribe-mobile-container").length||c('<div id="tribe-mobile-container" />').insertAfter(d),a.length)k(a.attr("data-day"),a.attr("data-date-name"));else{var e=b.filter(".tribe-events-thismonth").first();k(e.attr("data-day"),e.attr("data-date-name"))}}function m(){c(".tribe-events-calendar th").each(function(){var a=c(this),b=a.attr("data-day-abbr"),d=a.attr("title");a.text(q.is(".tribe-mobile")?b: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;t.val().length?"0"!==g.datepicker_format?g.date=tribeDateFormat(t.bootstrapDatepicker("getDate"),"tribeMonthQuery"):g.date=t.val():u||(g.date=d.cur_date.slice(0,-3)),g.filter_cats?d.cur_url=c("#tribe-events-header").data("baseurl")+g.date+"/":d.cur_url=v+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.category&&(g.params.tribe_event_category=g.category),g.url_params={},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.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-bar-date"),u=!1,v="/";"undefined"!=typeof i.events_base?v=i.events_base:r.length&&(v=r.first().attr("href").slice(0,-8)),d.default_permalinks&&(v=v.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)),t.val(s.substring(0,7)));var w="yyyy-mm";if("0"!==g.datepicker_format){var x=parseInt(g.datepicker_format),y="m"+g.datepicker_format.toString();w=d.datepicker_formats.month[x],s&&(s.length<=7&&(s+="-01"),t.val(tribeDateFormat(s,y)))}if(d.datepicker_opts={format:w,minViewMode:"months",autoclose:!0},t.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(u=!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=v:d.cur_url=v+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 z="action=tribe_calendar&eventDate="+c("#tribe-events-header").data("date");d.params.length&&(z=z+"&"+d.params),g.category&&(z=z+"&tribe_event_category="+g.category),history.replaceState({tribe_params:z},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",f.update_picker("0"!==g.datepicker_format?tribeDateFormat(g.mdate,y):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.attr("data-day"),b.attr("data-date-name"))}}).on("click",".mobile-trigger",function(a){q.is(".tribe-mobile")&&(a.preventDefault(),a.stopPropagation(),k(c(this).attr("data-day"),c(this).attr("data-date-name")))}),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.cur_url=v+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);
|
resources/tribe-events-ajax-day.js
CHANGED
@@ -18,10 +18,12 @@
|
|
18 |
|
19 |
$( document ).ready( function() {
|
20 |
|
21 |
-
var $nav_link = $( '[class^="tribe-events-nav-"] a' )
|
22 |
-
|
23 |
|
24 |
-
if (
|
|
|
|
|
25 |
base_url = $nav_link.first().attr( 'href' ).slice( 0, -11 );
|
26 |
}
|
27 |
|
18 |
|
19 |
$( document ).ready( function() {
|
20 |
|
21 |
+
var $nav_link = $( '[class^="tribe-events-nav-"] a' );
|
22 |
+
var base_url = '/';
|
23 |
|
24 |
+
if ( 'undefined' !== typeof config.events_base ) {
|
25 |
+
base_url = config.events_base;
|
26 |
+
} else if ( $nav_link.length ) {
|
27 |
base_url = $nav_link.first().attr( 'href' ).slice( 0, -11 );
|
28 |
}
|
29 |
|
resources/tribe-events-ajax-day.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(a,b,c,d,e,f,g,h,i){c(b).ready(function(){function j(){c(".tribe-events-day-time-slot").length&&(c(".tribe-events-day-time-slot").find(".vevent:last").addClass("tribe-events-last"),c(".tribe-events-day-time-slot:first").find(".vevent:first").removeClass("tribe-events-first"))}function k(a){if("change_view"!=tribe_events_bar_action){if(a.preventDefault(),g.ajax_running)return;var b=c("#tribe-bar-date").val();g.popping=!1,b.length?(g.date=c("#tribe-bar-date").val(),d.cur_url=d.default_permalinks?n+"="+d.cur_date:n+d.cur_date+"/"):(g.date=d.cur_date,d.cur_url=d.default_permalinks?n+"="+d.cur_date:n+d.cur_date+"/"),f.pre_ajax(function(){l()})}}function l(){f.invalid_date(g.date)||(g.pushcount=0,g.ajax_running=!0,g.popping||(g.url_params={},g.params={action:"tribe_event_day",eventDate:g.date},g.url_params={action:"tribe_event_day"},g.category&&(g.params.tribe_event_category=g.category),d.default_permalinks&&(g.url_params.hasOwnProperty("eventDate")||(g.url_params.eventDate=g.date),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.pushstate=!0,g.do_string=!1,(g.pushcount>0||g.filters||d.default_permalinks)&&(g.pushstate=!1,g.do_string=!0)),h.pushstate&&!g.filter_cats?(c(e).trigger("tribe_ev_ajaxStart").trigger("tribe_ev_dayView_AjaxStart"),c("#tribe-events-content .tribe-events-loop").tribe_spin(),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:parseInt(a.total_count),view:a.view,max_pages:"",tribe_paged:"",timestamp:(new Date).getTime()};var h=c.parseHTML(a.html);c("#tribe-events-content").replaceWith(h),0===a.total_count&&c("#tribe-events-header .tribe-events-sub-nav").empty(),c(".tribe-events-promo").next(".tribe-events-promo").remove(),g.page_title=c("#tribe-events-header").data("title"),b.title=g.page_title,g.do_string&&(-1!==d.cur_url.indexOf("?")&&(d.cur_url=d.cur_url.split("?")[0]),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),j(),c(e).trigger("tribe_ev_ajaxSuccess").trigger("tribe_ev_dayView_AjaxSuccess")}})):
|
1 |
+
!function(a,b,c,d,e,f,g,h,i,j){c(b).ready(function(){function j(){c(".tribe-events-day-time-slot").length&&(c(".tribe-events-day-time-slot").find(".vevent:last").addClass("tribe-events-last"),c(".tribe-events-day-time-slot:first").find(".vevent:first").removeClass("tribe-events-first"))}function k(a){if("change_view"!=tribe_events_bar_action){if(a.preventDefault(),g.ajax_running)return;var b=c("#tribe-bar-date").val();g.popping=!1,b.length?(g.date=c("#tribe-bar-date").val(),d.cur_url=d.default_permalinks?n+"="+d.cur_date:n+d.cur_date+"/"):(g.date=d.cur_date,d.cur_url=d.default_permalinks?n+"="+d.cur_date:n+d.cur_date+"/"),f.pre_ajax(function(){l()})}}function l(){f.invalid_date(g.date)||(g.pushcount=0,g.ajax_running=!0,g.popping||(g.url_params={},g.params={action:"tribe_event_day",eventDate:g.date},g.url_params={action:"tribe_event_day"},g.category&&(g.params.tribe_event_category=g.category),d.default_permalinks&&(g.url_params.hasOwnProperty("eventDate")||(g.url_params.eventDate=g.date),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.pushstate=!0,g.do_string=!1,(g.pushcount>0||g.filters||d.default_permalinks)&&(g.pushstate=!1,g.do_string=!0)),h.pushstate&&!g.filter_cats?(c(e).trigger("tribe_ev_ajaxStart").trigger("tribe_ev_dayView_AjaxStart"),c("#tribe-events-content .tribe-events-loop").tribe_spin(),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:parseInt(a.total_count),view:a.view,max_pages:"",tribe_paged:"",timestamp:(new Date).getTime()};var h=c.parseHTML(a.html);c("#tribe-events-content").replaceWith(h),0===a.total_count&&c("#tribe-events-header .tribe-events-sub-nav").empty(),c(".tribe-events-promo").next(".tribe-events-promo").remove(),g.page_title=c("#tribe-events-header").data("title"),b.title=g.page_title,g.do_string&&(-1!==d.cur_url.indexOf("?")&&(d.cur_url=d.cur_url.split("?")[0]),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),j(),c(e).trigger("tribe_ev_ajaxSuccess").trigger("tribe_ev_dayView_AjaxSuccess")}})):g.url_params.length?a.location=d.cur_url+"?"+g.url_params:a.location=d.cur_url)}var m=c('[class^="tribe-events-nav-"] a'),n="/";if("undefined"!=typeof i.events_base?n=i.events_base:m.length&&(n=m.first().attr("href").slice(0,-11)),g.filter_cats&&(n=c("#tribe-events-header").data("baseurl").slice(0,-11)),d.default_permalinks&&(n=n.split("?")[0]),g.date=c("#tribe-events-header").data("date"),j(),h.pushstate&&!h.map_view()){var o="action=tribe_event_day&eventDate="+g.date;d.params.length&&(o=o+"&"+d.params),g.category&&(o=o+"&tribe_event_category="+g.category),history.replaceState({tribe_params:o,tribe_url_params:d.params},"",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(){l()}),f.set_form(g.params))})}c("#tribe-events").on("click",".tribe-events-nav-previous a, .tribe-events-nav-next a",function(a){if(a.preventDefault(),!g.ajax_running&&!g.updating_picker){var b=c(this);g.popping=!1,g.date=b.attr("data-day"),g.filter_cats?d.cur_url=n+g.date+"/":d.cur_url=b.attr("href"),f.update_picker("0"!==g.datepicker_format?tribeDateFormat(g.date,d.datepicker_formats.main[g.datepicker_format]):g.date),f.pre_ajax(function(){l()})}}),f.snap("#tribe-events-bar","#tribe-events","#tribe-events-footer .tribe-events-nav-previous a, #tribe-events-footer .tribe-events-nav-next a"),c("form#tribe-bar-form").on("submit",function(a){k(a)}),(h.no_bar()||h.live_ajax()&&h.pushstate)&&c("#tribe-bar-date").on("changeDate",function(a){g.updating_picker||h.reset_on()||(g.popping=!1,"0"!==g.datepicker_format?g.date=tribeDateFormat(c(this).bootstrapDatepicker("getDate"),"tribeQuery"):g.date=c(this).val(),d.cur_url=d.default_permalinks?n:n+g.date+"/",f.pre_ajax(function(){l()}))}),c(e).on("tribe_ev_runAjax",function(){l()}),c(e).on("tribe_ev_updatingRecurrence",function(){g.filter_cats?d.cur_url=d.default_permalinks?n+"="+d.cur_date:n+d.cur_date+"/":d.cur_url=c("#tribe-events-header").attr("data-baseurl"),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);
|
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: 3.9.
|
6 |
Author: Modern Tribe, Inc.
|
7 |
Author URI: http://m.tri.be/1x
|
8 |
Text Domain: tribe-events-calendar
|
@@ -31,5 +31,5 @@ require_once( dirname( __FILE__ ) . '/lib/the-events-calendar.class.php' );
|
|
31 |
|
32 |
TribeEvents::instance();
|
33 |
|
34 |
-
register_activation_hook(
|
35 |
-
register_deactivation_hook( __FILE__, 'flush_rewrite_rules' );
|
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: 3.9.3
|
6 |
Author: Modern Tribe, Inc.
|
7 |
Author URI: http://m.tri.be/1x
|
8 |
Text Domain: tribe-events-calendar
|
31 |
|
32 |
TribeEvents::instance();
|
33 |
|
34 |
+
register_activation_hook( __FILE__, array( 'TribeEvents', 'flushRewriteRules' ) );
|
35 |
+
register_deactivation_hook( __FILE__, 'flush_rewrite_rules' );
|