WordPress.org

Make WordPress Core

Changeset 27308


Ignore:
Timestamp:
02/27/2014 02:54:58 AM (7 years ago)
Author:
wonderboymusic
Message:

Populate playlist setting values with their default value if they don't exist while parsing shortcode attributes.

Props kovshenin.
See #26631.

File:
1 edited

Legend:

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

    r27266 r27308  
    397397            if ( -1 !== jQuery.inArray( prop, ['playlist', 'video-playlist'] ) ) {
    398398                _.each(['tracknumbers', 'tracklist', 'images', 'artists'], function (setting) {
     399                    if ( 'undefined' === typeof attrs[ '_' + setting ] ) {
     400                        attrs[ '_' + setting ] = wp.media[ prop ].defaults[ setting ];
     401                    }
     402
    399403                    if ( attrs['_' + setting] ) {
    400404                        attrs[setting] = true;
Note: See TracChangeset for help on using the changeset viewer.