Make WordPress Core


Ignore:
Timestamp:
02/27/2012 07:23:03 PM (13 years ago)
Author:
ryan
Message:

Pass post id to get_upload_iframe_src() instead of relying on a global. Props tott. fixes #20003

File:
1 edited

Legend:

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

    r19982 r19999  
    393393}
    394394
    395 function get_upload_iframe_src( $type = null ) {
     395function get_upload_iframe_src( $type = null, $post_id = null ) {
    396396    global $post_ID;
    397397
    398     $uploading_iframe_ID = (int) $post_ID;
     398    if ( empty( $post_id ) )
     399        $post_id = $post_ID;
     400
     401    $uploading_iframe_ID = (int) $post_id;
    399402    $upload_iframe_src = add_query_arg( 'post_id', $uploading_iframe_ID, admin_url('media-upload.php') );
    400403
Note: See TracChangeset for help on using the changeset viewer.