Media: Include the link URL when inserting non-image attachments. props koopersmith. fixes #22544.
git-svn-id: https://develop.svn.wordpress.org/trunk@22835 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1b8e6d9ac6
commit
9774c85abc
@ -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…
x
Reference in New Issue
Block a user