From 1481b6a07ccc6949676701b1b92acd84641cdd60 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 27 Feb 2014 02:54:58 +0000 Subject: [PATCH] Populate playlist setting values with their default value if they don't exist while parsing shortcode attributes. Props kovshenin. See #26631. git-svn-id: https://develop.svn.wordpress.org/trunk@27308 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/media-editor.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wp-includes/js/media-editor.js b/src/wp-includes/js/media-editor.js index ec13796fae..b70a1265c2 100644 --- a/src/wp-includes/js/media-editor.js +++ b/src/wp-includes/js/media-editor.js @@ -396,6 +396,10 @@ if ( -1 !== jQuery.inArray( prop, ['playlist', 'video-playlist'] ) ) { _.each(['tracknumbers', 'tracklist', 'images', 'artists'], function (setting) { + if ( 'undefined' === typeof attrs[ '_' + setting ] ) { + attrs[ '_' + setting ] = wp.media[ prop ].defaults[ setting ]; + } + if ( attrs['_' + setting] ) { attrs[setting] = true; } else {