From ebe800de42399cf58ca240ca4ef688e76557c8a3 Mon Sep 17 00:00:00 2001 From: Daryl Koopersmith Date: Wed, 10 Oct 2012 10:08:43 +0000 Subject: [PATCH] Media JS: Ensure the subtype key has a default set. Prevents undefined JS errors in the attachments view template. see #21390. git-svn-id: http://core.svn.wordpress.org/trunk@22160 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/js/media-views.js | 3 ++- wp-includes/media.php | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/wp-includes/js/media-views.js b/wp-includes/js/media-views.js index b72aa75413..ed871747a6 100644 --- a/wp-includes/js/media-views.js +++ b/wp-includes/js/media-views.js @@ -409,7 +409,8 @@ options = _.defaults( this.model.toJSON(), { orientation: 'landscape', uploading: false, - type: '' + type: '', + subtype: '' }); options.buttons = this.buttons; diff --git a/wp-includes/media.php b/wp-includes/media.php index 796f00d7f3..6d72e3d30b 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -1340,8 +1340,6 @@ function wp_print_media_templates( $attachment ) {
<%- filename %>
<% } %> - - <% if ( buttons.close ) { %> × <% } %>