Make WordPress Core

Changeset 22889


Ignore:
Timestamp:
11/28/2012 02:28:10 AM (12 years ago)
Author:
nacin
Message:

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.

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/media-views.js

    r22888 r22889  
    18021802                this.options.$browser = this.controller.uploader.$browser;
    18031803
     1804            if ( _.isUndefined( this.options.postId ) )
     1805                this.options.postId = media.view.settings.postId;
     1806
    18041807            this.views.set( '.upload-inline-status', new media.view.UploaderStatus({
    18051808                controller: this.controller
  • trunk/wp-includes/media.php

    r22884 r22889  
    15391539
    15401540            <div class="post-upload-ui">
    1541                 <?php do_action( 'pre-upload-ui' ); ?>
    1542                 <?php do_action( 'pre-plupload-upload-ui' ); ?>
    1543                 <?php do_action( 'post-plupload-upload-ui' ); ?>
    1544 
    15451541                <?php
     1542                do_action( 'pre-upload-ui' );
     1543                do_action( 'pre-plupload-upload-ui' );
     1544
     1545                if ( 10 === remove_action( 'post-plupload-upload-ui', 'media_upload_flash_bypass' ) ) {
     1546                    do_action( 'post-plupload-upload-ui' );
     1547                    add_action( 'post-plupload-upload-ui', 'media_upload_flash_bypass' );
     1548                } else {
     1549                    do_action( 'post-plupload-upload-ui' );
     1550                }
     1551
    15461552                $upload_size_unit = $max_upload_size = wp_max_upload_size();
    15471553                $byte_sizes = array( 'KB', 'MB', 'GB' );
     
    15641570                ?></p>
    15651571
    1566                 <?php if ( ( $GLOBALS['is_IE'] || $GLOBALS['is_opera']) && $max_upload_size > 100 * 1024 * 1024 ) : ?>
    1567                     <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>
     1572                <?php if ( ( $GLOBALS['is_IE'] || $GLOBALS['is_opera']) && $max_upload_size > 100 * 1024 * 1024 ) :
     1573                    $browser_uploader = admin_url( 'media-new.php?browser-uploader&post_id=' ) . '{{ data.postId }}';
     1574                    ?>
     1575                    <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.' ),
     1576                        $browser_uploader, '_blank' ); ?></p>
    15681577                <?php endif; ?>
    15691578
Note: See TracChangeset for help on using the changeset viewer.