Add a canonical location for media frames, an alias to fetch attachments, and frame caching to custom header. fixes #22775.

git-svn-id: http://core.svn.wordpress.org/trunk@23092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Daryl Koopersmith
2012-12-06 05:06:49 +00:00
parent c4ef3fe74c
commit 30440dbb66
3 changed files with 16 additions and 3 deletions
+7 -1
View File
@@ -18,8 +18,14 @@
var $el = $(this);
event.preventDefault();
// If the media frame already exists, reopen it.
if ( frame ) {
frame.open();
return;
}
// Create the media frame.
frame = wp.media({
frame = wp.media.frames.customHeader = wp.media({
// Set the title of the modal.
title: $el.data('choose'),