WordPress.org

Make WordPress Core

Ticket #16518: includes-media_multi-file-upload-2.diff

File includes-media_multi-file-upload-2.diff, 1.3 KB (added by mikeschinkel, 7 years ago)

Added note about uploading multiple files, takes client OS into consideration.

  • media.php

     
    15681568        <span><input id="cancel-upload" disabled="disabled" onclick="cancelUpload()" type="button" value="<?php esc_attr_e('Cancel Upload'); ?>" class="button" /></span>
    15691569        </div>
    15701570        <p class="media-upload-size"><?php printf( __( 'Maximum upload file size: %d%s' ), $upload_size_unit, $sizes[$u] ); ?></p>
     1571        <?php
     1572                $wp_multiselect_key = false;
     1573                if ( strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') !== false ) {
     1574                        $wp_multiselect_key = 'CMD';
     1575                } elseif ( strpos($_SERVER['HTTP_USER_AGENT'], 'Windows') !== false ) {
     1576                        $wp_multiselect_key = 'CTRL';
     1577                } elseif ( strpos($_SERVER['HTTP_USER_AGENT'], 'Linux') !== false ) {
     1578                        $wp_multiselect_key = 'CTRL';
     1579                }
     1580                if ( $wp_multiselect_key ): ?>
     1581        <p class="multi-file-upload"><?php
     1582                printf( __(' <strong>Note:</strong> To select multiple files to upload you can press the <kbd>%s</kbd> key within the file selection popup.' ), $wp_multiselect_key );
     1583        endif; ?></p>
     1584        <?php unset( $wp_multiselect_key ); ?>
     1585
    15711586<?php do_action('post-flash-upload-ui'); ?>
    15721587        <p class="howto"><?php _e('After a file has been uploaded, you can add titles and descriptions.'); ?></p>
    15731588</div>