Media: Remove the link to the browser uploader. The only need for it is large files (> 100MB) in certain browsers (IE, Opera), so we will show the link then only. fixes #22604.
git-svn-id: http://core.svn.wordpress.org/trunk@22889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b70cb2d284
commit
32c57c6b6a
|
@ -1801,6 +1801,9 @@
|
||||||
if ( ! this.options.$browser && this.controller.uploader )
|
if ( ! this.options.$browser && this.controller.uploader )
|
||||||
this.options.$browser = this.controller.uploader.$browser;
|
this.options.$browser = this.controller.uploader.$browser;
|
||||||
|
|
||||||
|
if ( _.isUndefined( this.options.postId ) )
|
||||||
|
this.options.postId = media.view.settings.postId;
|
||||||
|
|
||||||
this.views.set( '.upload-inline-status', new media.view.UploaderStatus({
|
this.views.set( '.upload-inline-status', new media.view.UploaderStatus({
|
||||||
controller: this.controller
|
controller: this.controller
|
||||||
}) );
|
}) );
|
||||||
|
|
|
@ -1538,11 +1538,17 @@ function wp_print_media_templates() {
|
||||||
<div class="upload-inline-status"></div>
|
<div class="upload-inline-status"></div>
|
||||||
|
|
||||||
<div class="post-upload-ui">
|
<div class="post-upload-ui">
|
||||||
<?php do_action( 'pre-upload-ui' ); ?>
|
|
||||||
<?php do_action( 'pre-plupload-upload-ui' ); ?>
|
|
||||||
<?php do_action( 'post-plupload-upload-ui' ); ?>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
do_action( 'pre-upload-ui' );
|
||||||
|
do_action( 'pre-plupload-upload-ui' );
|
||||||
|
|
||||||
|
if ( 10 === remove_action( 'post-plupload-upload-ui', 'media_upload_flash_bypass' ) ) {
|
||||||
|
do_action( 'post-plupload-upload-ui' );
|
||||||
|
add_action( 'post-plupload-upload-ui', 'media_upload_flash_bypass' );
|
||||||
|
} else {
|
||||||
|
do_action( 'post-plupload-upload-ui' );
|
||||||
|
}
|
||||||
|
|
||||||
$upload_size_unit = $max_upload_size = wp_max_upload_size();
|
$upload_size_unit = $max_upload_size = wp_max_upload_size();
|
||||||
$byte_sizes = array( 'KB', 'MB', 'GB' );
|
$byte_sizes = array( 'KB', 'MB', 'GB' );
|
||||||
|
|
||||||
|
@ -1563,8 +1569,11 @@ function wp_print_media_templates() {
|
||||||
printf( __( 'Maximum upload file size: %d%s.' ), esc_html($upload_size_unit), esc_html($byte_sizes[$u]) );
|
printf( __( 'Maximum upload file size: %d%s.' ), esc_html($upload_size_unit), esc_html($byte_sizes[$u]) );
|
||||||
?></p>
|
?></p>
|
||||||
|
|
||||||
<?php if ( ( $GLOBALS['is_IE'] || $GLOBALS['is_opera']) && $max_upload_size > 100 * 1024 * 1024 ) : ?>
|
<?php if ( ( $GLOBALS['is_IE'] || $GLOBALS['is_opera']) && $max_upload_size > 100 * 1024 * 1024 ) :
|
||||||
<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>
|
$browser_uploader = admin_url( 'media-new.php?browser-uploader&post_id=' ) . '{{ data.postId }}';
|
||||||
|
?>
|
||||||
|
<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.' ),
|
||||||
|
$browser_uploader, '_blank' ); ?></p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php do_action( 'post-upload-ui' ); ?>
|
<?php do_action( 'post-upload-ui' ); ?>
|
||||||
|
|
Loading…
Reference in New Issue