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
This commit is contained in:
azaozz 2009-04-22 11:10:15 +00:00
parent 8d96798043
commit a87fce21b6
1 changed files with 3 additions and 4 deletions

View File

@ -69,10 +69,9 @@ function the_media_upload_tabs() {
$current = $redir_tab; $current = $redir_tab;
elseif ( isset($_GET['tab']) && array_key_exists($_GET['tab'], $tabs) ) elseif ( isset($_GET['tab']) && array_key_exists($_GET['tab'], $tabs) )
$current = $_GET['tab']; $current = $_GET['tab'];
else { else
$keys = array_keys($tabs); $current = apply_filters('media_upload_default_tab', 'type');
$current = array_shift($keys);
}
foreach ( $tabs as $callback => $text ) { foreach ( $tabs as $callback => $text ) {
$class = ''; $class = '';
if ( $current == $callback ) if ( $current == $callback )