Populate playlist setting values with their default value if they don't exist while parsing shortcode attributes.
Props kovshenin. See #26631. Built from https://develop.svn.wordpress.org/trunk@27308 git-svn-id: http://core.svn.wordpress.org/trunk@27161 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d55eb3901c
commit
8a4ef32f7a
|
@ -396,6 +396,10 @@
|
||||||
|
|
||||||
if ( -1 !== jQuery.inArray( prop, ['playlist', 'video-playlist'] ) ) {
|
if ( -1 !== jQuery.inArray( prop, ['playlist', 'video-playlist'] ) ) {
|
||||||
_.each(['tracknumbers', 'tracklist', 'images', 'artists'], function (setting) {
|
_.each(['tracknumbers', 'tracklist', 'images', 'artists'], function (setting) {
|
||||||
|
if ( 'undefined' === typeof attrs[ '_' + setting ] ) {
|
||||||
|
attrs[ '_' + setting ] = wp.media[ prop ].defaults[ setting ];
|
||||||
|
}
|
||||||
|
|
||||||
if ( attrs['_' + setting] ) {
|
if ( attrs['_' + setting] ) {
|
||||||
attrs[setting] = true;
|
attrs[setting] = true;
|
||||||
} else {
|
} else {
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue