mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
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:
@@ -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");
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user