mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-09 09:57:38 +01:00
Fix inserting of multiple attachments with captions when the first attachment does not have a caption. props azaozz. fixes #22720.
git-svn-id: http://core.svn.wordpress.org/trunk@23055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
87d43d7aa9
commit
dc9e6144be
@ -24,10 +24,10 @@ function send_to_editor(h) {
|
||||
if ( tinymce.isIE && ed.windowManager.insertimagebookmark )
|
||||
ed.selection.moveToBookmark(ed.windowManager.insertimagebookmark);
|
||||
|
||||
if ( h.indexOf('[caption') === 0 ) {
|
||||
if ( h.indexOf('[caption') !== -1 ) {
|
||||
if ( ed.wpSetImgCaption )
|
||||
h = ed.wpSetImgCaption(h);
|
||||
} else if ( h.indexOf('[gallery') === 0 ) {
|
||||
} else if ( h.indexOf('[gallery') !== -1 ) {
|
||||
if ( ed.plugins.wpgallery )
|
||||
h = ed.plugins.wpgallery._do_gallery(h);
|
||||
} else if ( h.indexOf('[embed') === 0 ) {
|
||||
|
@ -352,10 +352,10 @@
|
||||
if ( tinymce.isIE && ed.windowManager.insertimagebookmark )
|
||||
ed.selection.moveToBookmark(ed.windowManager.insertimagebookmark);
|
||||
|
||||
if ( h.indexOf('[caption') === 0 ) {
|
||||
if ( h.indexOf('[caption') !== -1 ) {
|
||||
if ( ed.wpSetImgCaption )
|
||||
h = ed.wpSetImgCaption(h);
|
||||
} else if ( h.indexOf('[gallery') === 0 ) {
|
||||
} else if ( h.indexOf('[gallery') !== -1 ) {
|
||||
if ( ed.plugins.wpgallery )
|
||||
h = ed.plugins.wpgallery._do_gallery(h);
|
||||
} else if ( h.indexOf('[embed') === 0 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user