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

git-svn-id: https://develop.svn.wordpress.org/trunk@29776 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2014-09-29 00:13:47 +00:00
parent 2e58e91dcc
commit 3b757232d0
2 changed files with 8 additions and 4 deletions

View File

@ -1796,9 +1796,11 @@ $plupload_init = array(
'multipart_params' => $post_params,
);
// Currently only iOS Safari supports multiple files uploading but has a bug that prevents uploading of videos
// Currently only iOS Safari supports multiple files uploading but iOS 7.x has a bug that prevents uploading of videos
// when enabled. See #29602.
if ( wp_is_mobile() ) {
if ( wp_is_mobile() && strpos( $_SERVER['HTTP_USER_AGENT'], 'OS 7_' ) !== false &&
strpos( $_SERVER['HTTP_USER_AGENT'], 'like Mac OS X' ) !== false ) {
$plupload_init['multi_selection'] = false;
}

View File

@ -2536,9 +2536,11 @@ function wp_plupload_default_settings() {
),
);
// Currently only iOS Safari supports multiple files uploading but has a bug that prevents uploading of videos
// Currently only iOS Safari supports multiple files uploading but iOS 7.x has a bug that prevents uploading of videos
// when enabled. See #29602.
if ( wp_is_mobile() ) {
if ( wp_is_mobile() && strpos( $_SERVER['HTTP_USER_AGENT'], 'OS 7_' ) !== false &&
strpos( $_SERVER['HTTP_USER_AGENT'], 'like Mac OS X' ) !== false ) {
$defaults['multi_selection'] = false;
}