Make WordPress Core

Changeset 11896


Ignore:
Timestamp:
09/01/2009 08:44:17 PM (17 years ago)
Author:
westi
Message:

Always filter the url in the media upload form. Fixes #10707 props nbachiyski.

File:
1 edited

Legend:

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

    r11868 r11896  
    15681568 */
    15691569function media_upload_gallery_form($errors) {
    1570     global $redir_tab;
     1570    global $redir_tab, $type;
    15711571
    15721572    $redir_tab = 'gallery';
     
    15741574
    15751575    $post_id = intval($_REQUEST['post_id']);
    1576     $form_action_url = admin_url("media-upload.php?type={$GLOBALS['type']}&tab=gallery&post_id=$post_id");
     1576    $form_action_url = admin_url("media-upload.php?type=$type&tab=gallery&post_id=$post_id");
     1577    $form_action_url = apply_filters('media_upload_form_url', $form_action_url, $type);
    15771578?>
    15781579
     
    17131714    $post_id = intval($_REQUEST['post_id']);
    17141715
    1715     $form_action_url = admin_url("media-upload.php?type={$GLOBALS['type']}&tab=library&post_id=$post_id");
     1716    $form_action_url = admin_url("media-upload.php?type=$type&tab=library&post_id=$post_id");
     1717    $form_action_url = apply_filters('media_upload_form_url', $form_action_url, $type);
    17161718
    17171719    $_GET['paged'] = isset( $_GET['paged'] ) ? intval($_GET['paged']) : 0;
Note: See TracChangeset for help on using the changeset viewer.