Version Description
- Bug fix: Don't use embed target link when AJAX disabled.
- Improvement: Add AJAX navigation into browser history & address bar.
Download this release
Release Info
Developer | joedolson |
Plugin | My Calendar |
Version | 3.2.12 |
Comparing to | |
See all releases |
Code changes from version 3.2.11 to 3.2.12
- js/mc-ajax.js +4 -0
- my-calendar-output.php +5 -2
- my-calendar.php +2 -2
- readme.txt +6 -1
js/mc-ajax.js
CHANGED
@@ -7,6 +7,10 @@
|
|
7 |
var calendar = $( this ).closest( '.mc-main' );
|
8 |
var ref = calendar.attr('id');
|
9 |
var link = $(this).attr('href');
|
|
|
|
|
|
|
|
|
10 |
var height = calendar.height();
|
11 |
$('#' + ref).html('<div class=\"mc-loading\"></div><div class=\"loading\" style=\"height:' + height + 'px\"><span class="screen-reader-text">Loading...</span></div>');
|
12 |
$('#' + ref).load(link + ' #' + ref + ' > *', function ( response, status, xhr ) {
|
7 |
var calendar = $( this ).closest( '.mc-main' );
|
8 |
var ref = calendar.attr('id');
|
9 |
var link = $(this).attr('href');
|
10 |
+
var url = new URL(link);
|
11 |
+
url.searchParams.delete('embed');
|
12 |
+
|
13 |
+
window.history.pushState({}, '', url );
|
14 |
var height = calendar.height();
|
15 |
$('#' + ref).html('<div class=\"mc-loading\"></div><div class=\"loading\" style=\"height:' + height + 'px\"><span class="screen-reader-text">Loading...</span></div>');
|
16 |
$('#' + ref).load(link + ' #' + ref + ' > *', function ( response, status, xhr ) {
|
my-calendar-output.php
CHANGED
@@ -836,8 +836,11 @@ function mc_date_switcher( $type = 'calendar', $cid = 'all', $time = 'month', $d
|
|
836 |
* @return string
|
837 |
*/
|
838 |
function mc_url_in_loop( $url ) {
|
839 |
-
|
840 |
-
|
|
|
|
|
|
|
841 |
}
|
842 |
|
843 |
return $url;
|
836 |
* @return string
|
837 |
*/
|
838 |
function mc_url_in_loop( $url ) {
|
839 |
+
// Only if AJAX is enabled.
|
840 |
+
if ( ( '1' !== get_option( 'mc_ajax_javascript' ) ) ) {
|
841 |
+
if ( is_singular() && in_the_loop() && is_main_query() ) {
|
842 |
+
$url = esc_url( add_query_arg( 'embed', 'true', html_entity_decode( $url ) ) );
|
843 |
+
}
|
844 |
}
|
845 |
|
846 |
return $url;
|
my-calendar.php
CHANGED
@@ -17,7 +17,7 @@
|
|
17 |
* License: GPL-2.0+
|
18 |
* License URI: http://www.gnu.org/license/gpl-2.0.txt
|
19 |
* Domain Path: lang
|
20 |
-
* Version: 3.2.
|
21 |
*/
|
22 |
|
23 |
/*
|
@@ -42,7 +42,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
42 |
}
|
43 |
|
44 |
global $mc_version, $wpdb;
|
45 |
-
$mc_version = '3.2.
|
46 |
|
47 |
define( 'MC_DEBUG', false );
|
48 |
|
17 |
* License: GPL-2.0+
|
18 |
* License URI: http://www.gnu.org/license/gpl-2.0.txt
|
19 |
* Domain Path: lang
|
20 |
+
* Version: 3.2.12
|
21 |
*/
|
22 |
|
23 |
/*
|
42 |
}
|
43 |
|
44 |
global $mc_version, $wpdb;
|
45 |
+
$mc_version = '3.2.12';
|
46 |
|
47 |
define( 'MC_DEBUG', false );
|
48 |
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Requires at least: 4.4
|
|
6 |
Tested up to: 5.6
|
7 |
Requires PHP: 5.6
|
8 |
Text domain: my-calendar
|
9 |
-
Stable tag: 3.2.
|
10 |
License: GPLv2 or later
|
11 |
|
12 |
Accessible WordPress event calendar plugin. Show events from multiple calendars on pages, in posts, or in widgets.
|
@@ -84,6 +84,11 @@ Translating my plug-ins is always appreciated. Visit <a href="https://translate.
|
|
84 |
|
85 |
== Changelog ==
|
86 |
|
|
|
|
|
|
|
|
|
|
|
87 |
= 3.2.11 =
|
88 |
|
89 |
* Bug fix: switching to week view display broken.
|
6 |
Tested up to: 5.6
|
7 |
Requires PHP: 5.6
|
8 |
Text domain: my-calendar
|
9 |
+
Stable tag: 3.2.12
|
10 |
License: GPLv2 or later
|
11 |
|
12 |
Accessible WordPress event calendar plugin. Show events from multiple calendars on pages, in posts, or in widgets.
|
84 |
|
85 |
== Changelog ==
|
86 |
|
87 |
+
= 3.2.12 =
|
88 |
+
|
89 |
+
* Bug fix: Don't use embed target link when AJAX disabled.
|
90 |
+
* Improvement: Add AJAX navigation into browser history & address bar.
|
91 |
+
|
92 |
= 3.2.11 =
|
93 |
|
94 |
* Bug fix: switching to week view display broken.
|