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
This commit is contained in:
Andrew Ozz 2009-04-22 11:10:15 +00:00
parent 82e956b997
commit ad16220db1
1 changed files with 3 additions and 4 deletions

View File

@ -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 )