summaryrefslogtreecommitdiffstats
path: root/wp-admin/js
diff options
context:
space:
mode:
Diffstat (limited to 'wp-admin/js')
-rw-r--r--wp-admin/js/editor.js1
-rw-r--r--wp-admin/js/gallery.js2
2 files changed, 2 insertions, 1 deletions
diff --git a/wp-admin/js/editor.js b/wp-admin/js/editor.js
index d2049e4..7f5875a 100644
--- a/wp-admin/js/editor.js
+++ b/wp-admin/js/editor.js
@@ -53,6 +53,7 @@ switchEditors = {
content = content.replace(new RegExp('\\s*<div', 'mg'), '\n<div');
content = content.replace(new RegExp('</div>\\s*', 'mg'), '</div>\n');
content = content.replace(new RegExp('\\s*\\[wp_caption([^\\[]+)\\[/wp_caption\\]\\s*', 'gi'), '\n\n[wp_caption$1[/wp_caption]\n\n');
+ content = content.replace(new RegExp('wp_caption\\]\\n\\n+\\[wp_caption', 'g'), 'wp_caption]\n\n[wp_caption');
var blocklist2 = 'blockquote|ul|ol|li|table|thead|tr|th|td|h[1-6]|pre';
content = content.replace(new RegExp('\\s*<(('+blocklist2+') ?[^>]*)\\s*>', 'mg'), '\n<$1>');
diff --git a/wp-admin/js/gallery.js b/wp-admin/js/gallery.js
index aae0221..f29573b 100644
--- a/wp-admin/js/gallery.js
+++ b/wp-admin/js/gallery.js
@@ -10,7 +10,7 @@ jQuery(function($) {
// When an update has occurred, adjust the order for each item
var galleryReorder = function(e, sort) {
- jQuery.each(sort['instance'].toArray(), function(i, id) {
+ jQuery.each(sort['element'].sortable('toArray'), function(i, id) {
jQuery('#' + id + ' .menu_order input')[0].value = i;
});
}