From ad16220db1eb8485a4233a6a4e68d1ed0537fd0a Mon Sep 17 00:00:00 2001 From: Andrew Ozz 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: https://develop.svn.wordpress.org/trunk@11051 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 )