Media: Output correct link html when inserting attachments. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
06830f4501
commit
0c219be45d
|
@ -484,6 +484,16 @@ window.wp = window.wp || {};
|
||||||
single: true
|
single: true
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Generate the `href` based on the `link` property.
|
||||||
|
if ( props.link && 'none' !== props.link ) {
|
||||||
|
props.anchor = props.anchor || {};
|
||||||
|
|
||||||
|
if ( 'post' === props.link )
|
||||||
|
props.anchor.href = attachment.link;
|
||||||
|
else if ( 'file' === props.link )
|
||||||
|
props.anchor.href = attachment.url;
|
||||||
|
}
|
||||||
|
|
||||||
// Generate the `a` element options, if they exist.
|
// Generate the `a` element options, if they exist.
|
||||||
if ( props.anchor ) {
|
if ( props.anchor ) {
|
||||||
options = {
|
options = {
|
||||||
|
|
Loading…
Reference in New Issue