Fix inserting of multiple attachments with captions when the first attachment does not have a caption. props azaozz. fixes #22720.
git-svn-id: https://develop.svn.wordpress.org/trunk@23055 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
25337c050c
commit
426eb50936
@ -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