From a87fce21b64f00de76cda70d8fc0cc07b9171a2f Mon Sep 17 00:00:00 2001 From: azaozz Date: Wed, 22 Apr 2009 11:10:15 +0000 Subject: [PATCH] Properly set the default tab in the uploader, props fuggi, fixes #7219 git-svn-id: http://svn.automattic.com/wordpress/trunk@11051 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/media.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 073563b22a..0f427271ad 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -69,10 +69,9 @@ function the_media_upload_tabs() { $current = $redir_tab; elseif ( isset($_GET['tab']) && array_key_exists($_GET['tab'], $tabs) ) $current = $_GET['tab']; - else { - $keys = array_keys($tabs); - $current = array_shift($keys); - } + else + $current = apply_filters('media_upload_default_tab', 'type'); + foreach ( $tabs as $callback => $text ) { $class = ''; if ( $current == $callback )