diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index b776967485..09e5d81e6c 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -2176,9 +2176,16 @@ function wp_media_insert_url_form( $default_view = 'image' ) { * @since 2.6.0 */ function media_upload_flash_bypass() { + $browser_uploader = admin_url( 'media-new.php?browser-uploader' ); + + if ( $post = get_post() ) + $browser_uploader .= '&post_id=' . intval( $post->ID ); + elseif ( ! empty( $GLOBALS['post_ID'] ) ) + $browser_uploader .= '&post_id=' . intval( $GLOBALS['post_ID'] ); + ?>
- browser uploader instead.' ), admin_url( 'media-new.php?browser-uploader' ), '_blank' ); ?> + browser uploader instead.' ), $browser_uploader, '_blank' ); ?>
- +