From ebc9a346507f6c1238af66705577b65db8d82ee2 Mon Sep 17 00:00:00 2001 From: Daryl Koopersmith Date: Wed, 10 Oct 2012 08:47:15 +0000 Subject: [PATCH] Reset the media modal to the library view after inserting a gallery. fixes #22151, see #21390, #21809. git-svn-id: http://core.svn.wordpress.org/trunk@22156 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/js/media-upload.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-admin/js/media-upload.js b/wp-admin/js/media-upload.js index 93204a3144..caf609de44 100644 --- a/wp-admin/js/media-upload.js +++ b/wp-admin/js/media-upload.js @@ -122,6 +122,9 @@ var tb_position; shortcode = view.gallery.shortcode( selection ); this.insert( shortcode.string() ); + + // Reset the workflow view to the library. + workflow.render('library'); }, this ); return workflow;