Media: Include the link URL when inserting non-image attachments. props koopersmith. fixes #22544.
git-svn-id: http://core.svn.wordpress.org/trunk@22835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
450b96a773
commit
951082d4da
|
@ -426,15 +426,17 @@
|
|||
id: attachment.id
|
||||
};
|
||||
|
||||
if ( props.linkUrl )
|
||||
options.url = props.linkUrl;
|
||||
|
||||
if ( 'image' === attachment.type ) {
|
||||
html = wp.media.string.image( props );
|
||||
options['caption'] = caption;
|
||||
|
||||
_.each({
|
||||
align: 'image-align',
|
||||
size: 'image-size',
|
||||
alt: 'image-alt',
|
||||
linkUrl: 'url'
|
||||
align: 'image-align',
|
||||
size: 'image-size',
|
||||
alt: 'image-alt'
|
||||
}, function( option, prop ) {
|
||||
if ( props[ prop ] )
|
||||
options[ option ] = props[ prop ];
|
||||
|
|
Loading…
Reference in New Issue