Version Description
- Fix TinyMCE dialog not closing properly. Props @astaryne for the report!
Download this release
Release Info
Developer | figureone |
Plugin | Insert Pages |
Version | 3.6.1 |
Comparing to | |
See all releases |
Code changes from version 3.6.0 to 3.6.1
- insert-pages.php +5 -5
- js/wpinsertpages.js +17 -10
- js/wpinsertpages_plugin.js +2 -0
- readme.txt +3 -0
insert-pages.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* Text Domain: insert-pages
|
8 |
* Domain Path: /languages
|
9 |
* License: GPL2
|
10 |
-
* Version: 3.6.
|
11 |
*
|
12 |
* @package insert-pages
|
13 |
*/
|
@@ -244,7 +244,7 @@ if ( ! class_exists( 'InsertPagesPlugin' ) ) {
|
|
244 |
'wpinsertpages',
|
245 |
plugins_url( '/js/wpinsertpages.js', __FILE__ ),
|
246 |
array( 'wpdialogs' ),
|
247 |
-
'
|
248 |
false
|
249 |
);
|
250 |
wp_localize_script(
|
@@ -1301,12 +1301,12 @@ if ( ! class_exists( 'InsertPagesPlugin' ) ) {
|
|
1301 |
</div>
|
1302 |
</div>
|
1303 |
<div class="submitbox">
|
|
|
|
|
|
|
1304 |
<div id="wp-insertpage-update">
|
1305 |
<input type="submit" value="<?php esc_attr_e( 'Insert Page', 'insert-pages' ); ?>" class="button button-primary" id="wp-insertpage-submit" name="wp-insertpage-submit">
|
1306 |
</div>
|
1307 |
-
<div id="wp-insertpage-cancel">
|
1308 |
-
<a class="submitdelete deletion" href="#"><?php _e( 'Cancel', 'insert-pages' ); ?></a>
|
1309 |
-
</div>
|
1310 |
</div>
|
1311 |
</form>
|
1312 |
</div>
|
7 |
* Text Domain: insert-pages
|
8 |
* Domain Path: /languages
|
9 |
* License: GPL2
|
10 |
+
* Version: 3.6.1
|
11 |
*
|
12 |
* @package insert-pages
|
13 |
*/
|
244 |
'wpinsertpages',
|
245 |
plugins_url( '/js/wpinsertpages.js', __FILE__ ),
|
246 |
array( 'wpdialogs' ),
|
247 |
+
'20210528',
|
248 |
false
|
249 |
);
|
250 |
wp_localize_script(
|
1301 |
</div>
|
1302 |
</div>
|
1303 |
<div class="submitbox">
|
1304 |
+
<div id="wp-insertpage-cancel">
|
1305 |
+
<button type="button" class="button"><?php _e( 'Cancel', 'insert-pages' ); ?></button>
|
1306 |
+
</div>
|
1307 |
<div id="wp-insertpage-update">
|
1308 |
<input type="submit" value="<?php esc_attr_e( 'Insert Page', 'insert-pages' ); ?>" class="button button-primary" id="wp-insertpage-submit" name="wp-insertpage-submit">
|
1309 |
</div>
|
|
|
|
|
|
|
1310 |
</div>
|
1311 |
</form>
|
1312 |
</div>
|
js/wpinsertpages.js
CHANGED
@@ -4,9 +4,9 @@
|
|
4 |
* @output wp-includes/js/wplink.js
|
5 |
*/
|
6 |
|
7 |
-
/* global wpInsertPages */
|
8 |
|
9 |
-
(function
|
10 |
var editor, searchTimer, RiverInsertPages, QueryInsertPages, correctedURL,
|
11 |
inputs = {},
|
12 |
rivers = {},
|
@@ -349,20 +349,27 @@
|
|
349 |
}
|
350 |
},
|
351 |
|
352 |
-
close: function() {
|
353 |
-
|
354 |
-
|
355 |
|
356 |
-
|
357 |
-
|
358 |
-
wpInsertPages.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
359 |
}
|
360 |
-
} else {
|
361 |
-
editor.focus();
|
362 |
}
|
363 |
|
364 |
inputs.backdrop.hide();
|
365 |
inputs.wrap.hide();
|
|
|
|
|
366 |
},
|
367 |
|
368 |
getAttrs: function() {
|
4 |
* @output wp-includes/js/wplink.js
|
5 |
*/
|
6 |
|
7 |
+
/* global wpInsertPages */
|
8 |
|
9 |
+
( function( $, wpInsertPagesL10n, wp ) {
|
10 |
var editor, searchTimer, RiverInsertPages, QueryInsertPages, correctedURL,
|
11 |
inputs = {},
|
12 |
rivers = {},
|
349 |
}
|
350 |
},
|
351 |
|
352 |
+
close: function( reset ) {
|
353 |
+
$( document.body ).removeClass( 'modal-open' );
|
354 |
+
wpInsertPages.modalOpen = false;
|
355 |
|
356 |
+
if ( reset !== 'noReset' ) {
|
357 |
+
if ( ! wpInsertPages.isMCE() ) {
|
358 |
+
wpInsertPages.textarea.focus();
|
359 |
+
|
360 |
+
if ( wpInsertPages.range ) {
|
361 |
+
wpInsertPages.range.moveToBookmark( wpInsertPages.range.getBookmark() );
|
362 |
+
wpInsertPages.range.select();
|
363 |
+
}
|
364 |
+
} else {
|
365 |
+
editor.focus();
|
366 |
}
|
|
|
|
|
367 |
}
|
368 |
|
369 |
inputs.backdrop.hide();
|
370 |
inputs.wrap.hide();
|
371 |
+
|
372 |
+
$( document ).trigger( 'wpinsertpages-close', inputs.wrap );
|
373 |
},
|
374 |
|
375 |
getAttrs: function() {
|
js/wpinsertpages_plugin.js
CHANGED
@@ -52,6 +52,8 @@
|
|
52 |
});
|
53 |
}
|
54 |
});
|
|
|
|
|
55 |
})
|
56 |
|
57 |
} )();
|
52 |
});
|
53 |
}
|
54 |
});
|
55 |
+
|
56 |
+
return {};
|
57 |
})
|
58 |
|
59 |
} )();
|
readme.txt
CHANGED
@@ -111,6 +111,9 @@ Just one! The plugin prevents you from embedding a page in itself, but you can t
|
|
111 |
|
112 |
== Changelog ==
|
113 |
|
|
|
|
|
|
|
114 |
= 3.6.0 =
|
115 |
* Add `insert_pages_tinymce_state` filter to set TinyMCE modal field defaults. [Details](https://wordpress.org/support/topic/customise-modal-content/)
|
116 |
* Add `insert_pages_available_templates` filter to customize the list of allowed custom templates. [Details](https://wordpress.org/support/topic/customise-modal-content/)
|
111 |
|
112 |
== Changelog ==
|
113 |
|
114 |
+
= 3.6.1 =
|
115 |
+
* Fix TinyMCE dialog not closing properly. Props @astaryne for the report!
|
116 |
+
|
117 |
= 3.6.0 =
|
118 |
* Add `insert_pages_tinymce_state` filter to set TinyMCE modal field defaults. [Details](https://wordpress.org/support/topic/customise-modal-content/)
|
119 |
* Add `insert_pages_available_templates` filter to customize the list of allowed custom templates. [Details](https://wordpress.org/support/topic/customise-modal-content/)
|