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

Built from https://develop.svn.wordpress.org/trunk@29776


git-svn-id: http://core.svn.wordpress.org/trunk@29548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2014-09-29 00:14:18 +00:00
parent 9bf3007b55
commit 7a55ab9164
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;
}