| 1 | Index: wp-includes/media.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-includes/media.php (revision 22873) |
|---|
| 4 | +++ wp-includes/media.php (working copy) |
|---|
| 5 | @@ -1254,7 +1254,7 @@ |
|---|
| 6 | 'multipart' => true, |
|---|
| 7 | 'urlstream_upload' => true, |
|---|
| 8 | ); |
|---|
| 9 | - |
|---|
| 10 | + |
|---|
| 11 | // Multi-file uploading doesn't currently work in iOS Safari, |
|---|
| 12 | // single-file allows the built-in camera to be used as source for images |
|---|
| 13 | if ( wp_is_mobile() ) |
|---|
| 14 | @@ -1537,11 +1537,17 @@ |
|---|
| 15 | <div class="upload-inline-status"></div> |
|---|
| 16 | |
|---|
| 17 | <div class="post-upload-ui"> |
|---|
| 18 | - <?php do_action( 'pre-upload-ui' ); ?> |
|---|
| 19 | - <?php do_action( 'pre-plupload-upload-ui' ); ?> |
|---|
| 20 | - <?php do_action( 'post-plupload-upload-ui' ); ?> |
|---|
| 21 | + <?php |
|---|
| 22 | + do_action( 'pre-upload-ui' ); |
|---|
| 23 | + do_action( 'pre-plupload-upload-ui' ); |
|---|
| 24 | |
|---|
| 25 | - <?php |
|---|
| 26 | + if ( remove_action('post-plupload-upload-ui', 'media_upload_flash_bypass') ) { |
|---|
| 27 | + do_action( 'post-plupload-upload-ui' ); |
|---|
| 28 | + add_action('post-plupload-upload-ui', 'media_upload_flash_bypass'); |
|---|
| 29 | + } else { |
|---|
| 30 | + do_action( 'post-plupload-upload-ui' ); |
|---|
| 31 | + } |
|---|
| 32 | + |
|---|
| 33 | $upload_size_unit = $max_upload_size = wp_max_upload_size(); |
|---|
| 34 | $byte_sizes = array( 'KB', 'MB', 'GB' ); |
|---|
| 35 | |
|---|
| 36 | @@ -1562,8 +1568,15 @@ |
|---|
| 37 | printf( __( 'Maximum upload file size: %d%s.' ), esc_html($upload_size_unit), esc_html($byte_sizes[$u]) ); |
|---|
| 38 | ?></p> |
|---|
| 39 | |
|---|
| 40 | - <?php if ( ( $GLOBALS['is_IE'] || $GLOBALS['is_opera']) && $max_upload_size > 100 * 1024 * 1024 ) : ?> |
|---|
| 41 | - <p class="big-file-warning"><?php _e('Your browser has some limitations uploading large files with the multi-file uploader. Please use the browser uploader for files over 100MB.'); ?></p> |
|---|
| 42 | + <?php if ( ( $GLOBALS['is_IE'] || $GLOBALS['is_opera']) && $max_upload_size > 100 * 1024 * 1024 ) : |
|---|
| 43 | + $browser_uploader = admin_url( 'media-new.php?browser-uploader' ); |
|---|
| 44 | + if ( $post = get_post() ) |
|---|
| 45 | + $browser_uploader .= '&post_id=' . intval( $post->ID ); |
|---|
| 46 | + elseif ( ! empty( $GLOBALS['post_ID'] ) ) |
|---|
| 47 | + $browser_uploader .= '&post_id=' . intval( $GLOBALS['post_ID'] ); |
|---|
| 48 | + ?> |
|---|
| 49 | + <p class="big-file-warning"><?php printf( __( 'Your browser has some limitations uploading large files with the multi-file uploader. Please use the <a href="%1$s" target="%2$s">browser uploader</a> for files over 100MB.' ), |
|---|
| 50 | + $browser_uploader, '_blank' ); ?></p> |
|---|
| 51 | <?php endif; ?> |
|---|
| 52 | |
|---|
| 53 | <?php do_action( 'post-upload-ui' ); ?> |
|---|