Media library updates from andy. see #5911

git-svn-id: https://develop.svn.wordpress.org/trunk@7092 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-02-28 21:29:51 +00:00
parent 41fe914d9e
commit b2e8a6ac54
5 changed files with 431 additions and 140 deletions
+11 -2
View File
@@ -19,12 +19,21 @@ if ( isset($action) && $action == 'edit' && !$ID )
wp_die(__("You are not allowed to be here"));
// upload type: image, video, file, ..?
if ( isset($_GET['type']) )
$type = strval($_GET['type']);
else
$type = apply_filters('media_upload_default_type', 'file');
// tab: gallery, library, or type-specific
if ( isset($_GET['tab']) )
$tab = strval($_GET['tab']);
else
$tab = apply_filters('media_upload_default_tab', 'computer');
$tab = apply_filters('media_upload_default_tab', 'type');
// let the action code decide how to handle the request
do_action("media_upload_$tab");
if ( $tab == 'type' )
do_action("media_upload_$type");
else
do_action("media_upload_$tab");
?>