Make WordPress Core

Changeset 22499


Ignore:
Timestamp:
11/09/2012 10:48:50 AM (12 years ago)
Author:
koopersmith
Message:

Media: Output correct link html when inserting attachments. see #21390.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/mce-view.js

    r22495 r22499  
    485485        };
    486486
     487        // Generate the `href` based on the `link` property.
     488        if ( props.link && 'none' !== props.link ) {
     489            props.anchor = props.anchor || {};
     490
     491            if ( 'post' === props.link )
     492                props.anchor.href = attachment.link;
     493            else if ( 'file' === props.link )
     494                props.anchor.href = attachment.url;
     495        }
     496
    487497        // Generate the `a` element options, if they exist.
    488498        if ( props.anchor ) {
Note: See TracChangeset for help on using the changeset viewer.