WordPress.org

Make WordPress Core

Changeset 29776


Ignore:
Timestamp:
09/29/2014 12:13:47 AM (5 years ago)
Author:
azaozz
Message:

Media: disable multi-file uploading in iOS 7.x Safari as it prevents uploading of videos. Fixes #29602 for trunk.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/media.php

    r29754 r29776  
    17971797);
    17981798
    1799 // Currently only iOS Safari supports multiple files uploading but has a bug that prevents uploading of videos
     1799// Currently only iOS Safari supports multiple files uploading but iOS 7.x has a bug that prevents uploading of videos
    18001800// when enabled. See #29602.
    1801 if ( wp_is_mobile() ) {
     1801if ( wp_is_mobile() && strpos( $_SERVER['HTTP_USER_AGENT'], 'OS 7_' ) !== false &&
     1802    strpos( $_SERVER['HTTP_USER_AGENT'], 'like Mac OS X' ) !== false ) {
     1803
    18021804    $plupload_init['multi_selection'] = false;
    18031805}
  • trunk/src/wp-includes/media.php

    r29764 r29776  
    25372537    );
    25382538
    2539     // Currently only iOS Safari supports multiple files uploading but has a bug that prevents uploading of videos
     2539    // Currently only iOS Safari supports multiple files uploading but iOS 7.x has a bug that prevents uploading of videos
    25402540    // when enabled. See #29602.
    2541     if ( wp_is_mobile() ) {
     2541    if ( wp_is_mobile() && strpos( $_SERVER['HTTP_USER_AGENT'], 'OS 7_' ) !== false &&
     2542        strpos( $_SERVER['HTTP_USER_AGENT'], 'like Mac OS X' ) !== false ) {
     2543
    25422544        $defaults['multi_selection'] = false;
    25432545    }
Note: See TracChangeset for help on using the changeset viewer.