WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/28/2008 09:29:51 PM (11 years ago)
Author:
ryan
Message:

Media library updates from andy. see #5911

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/media-upload.php

    r7043 r7092  
    2020
    2121// upload type: image, video, file, ..?
     22if ( isset($_GET['type']) )
     23    $type = strval($_GET['type']);
     24else
     25    $type = apply_filters('media_upload_default_type', 'file');
     26
     27// tab: gallery, library, or type-specific
    2228if ( isset($_GET['tab']) )
    2329    $tab = strval($_GET['tab']);
    2430else
    25     $tab = apply_filters('media_upload_default_tab', 'computer');
     31    $tab = apply_filters('media_upload_default_tab', 'type');
    2632
    2733// let the action code decide how to handle the request
    28 do_action("media_upload_$tab");
     34if ( $tab == 'type' )
     35    do_action("media_upload_$type");
     36else
     37    do_action("media_upload_$tab");
    2938
    3039?>
Note: See TracChangeset for help on using the changeset viewer.