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; + #>