From 5ead62b90cf6c9413a1abf596cfd65c2fd0c22d8 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Mon, 24 Feb 2014 20:25:54 +0000 Subject: [PATCH] Load default settings state when creating a new playlist in the media modal. Add a few missing inline `@this` annotations in `media-editor.js`. See #26631. git-svn-id: https://develop.svn.wordpress.org/trunk@27242 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/media-editor.js | 8 +++++++- src/wp-includes/media-template.php | 19 +++++++++++++++---- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/wp-includes/js/media-editor.js b/src/wp-includes/js/media-editor.js index fdf27bb319..ee1389a264 100644 --- a/src/wp-includes/js/media-editor.js +++ b/src/wp-includes/js/media-editor.js @@ -583,7 +583,7 @@ style: 'light', tracklist: false, tracknumbers: false, - images: false + images: true } }; @@ -812,10 +812,16 @@ }, this ); workflow.state('playlist-edit').on( 'update', function( selection ) { + /** + * @this wp.media.editor + */ this.insert( wp.media.playlist.shortcode( selection ).string() ); }, this ); workflow.state('video-playlist-edit').on( 'update', function( selection ) { + /** + * @this wp.media.editor + */ this.insert( wp.media['video-playlist'].shortcode( selection ).string() ); }, this ); diff --git a/src/wp-includes/media-template.php b/src/wp-includes/media-template.php index 14b1cff580..daf8c29911 100644 --- a/src/wp-includes/media-template.php +++ b/src/wp-includes/media-template.php @@ -431,24 +431,35 @@ function wp_print_media_templates() { + <# + var playlist = 'playlist-edit' === data.controller.id, emptyModel = 'undefined' === typeof data.model.style; + #>