Make WordPress Core

Changeset 22835


Ignore:
Timestamp:
11/26/2012 03:33:30 AM (14 years ago)
Author:
nacin
Message:

Media: Include the link URL when inserting non-image attachments. props koopersmith. fixes #22544.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/media-editor.js

    r22809 r22835  
    427427                                };
    428428
     429                                if ( props.linkUrl )
     430                                        options.url = props.linkUrl;
     431
    429432                                if ( 'image' === attachment.type ) {
    430433                                        html = wp.media.string.image( props );
    … …  
    432435
    433436                                        _.each({
    434                                                 align:   'image-align',
    435                                                 size:    'image-size',
    436                                                 alt:     'image-alt',
    437                                                 linkUrl: 'url'
     437                                                align: 'image-align',
     438                                                size:  'image-size',
     439                                                alt:   'image-alt'
    438440                                        }, function( option, prop ) {
    439441                                                if ( props[ prop ] )
Note: See TracChangeset for help on using the changeset viewer.