mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Clean up remnants from having negative Post_IDs, props markjaquith, fixes #18235
git-svn-id: https://develop.svn.wordpress.org/trunk@18823 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -401,12 +401,14 @@ function _media_button($title, $icon, $type, $id) {
|
||||
}
|
||||
|
||||
function get_upload_iframe_src($type) {
|
||||
global $post_ID, $temp_ID;
|
||||
$uploading_iframe_ID = (int) (0 == $post_ID ? $temp_ID : $post_ID);
|
||||
global $post_ID;
|
||||
|
||||
$uploading_iframe_ID = (int) $post_ID;
|
||||
$upload_iframe_src = add_query_arg( 'post_id', $uploading_iframe_ID, admin_url('media-upload.php') );
|
||||
|
||||
if ( 'media' != $type )
|
||||
$upload_iframe_src = add_query_arg('type', $type, $upload_iframe_src);
|
||||
|
||||
$upload_iframe_src = apply_filters($type . '_upload_iframe_src', $upload_iframe_src);
|
||||
|
||||
return add_query_arg('TB_iframe', true, $upload_iframe_src);
|
||||
|
||||
Reference in New Issue
Block a user