Make WordPress Core


Ignore:
Timestamp:
06/06/2012 09:45:17 PM (12 years ago)
Author:
koopersmith
Message:

Theme Customizer: Fix scrolling on iOS and Kindle Fire. props azaozz, helenyhou. fixes #20805.

Also fixes uploader UIs on iOS and Kindle Fire by improving wp.Uploader.
Adds mobile viewport specifications.
Moves scrollbar back to fixed positioning.

File:
1 edited

Legend:

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

    r20701 r21014  
    14681468    $max_upload_size = wp_max_upload_size();
    14691469
    1470     $settings = array(
     1470    $defaults = array(
    14711471        'runtimes'            => 'html5,silverlight,flash,html4',
    14721472        'file_data_name'      => 'async-upload', // key passed to $_FILE.
     
    14811481    );
    14821482
    1483     $settings = apply_filters( 'plupload_default_settings', $settings );
     1483    $defaults = apply_filters( 'plupload_default_settings', $defaults );
    14841484
    14851485    $params = array(
     
    14891489    $params = apply_filters( 'plupload_default_params', $params );
    14901490    $params['_wpnonce'] = wp_create_nonce( 'media-form' );
    1491     $settings['multipart_params'] = $params;
    1492 
    1493     $script = 'var wpPluploadDefaults = ' . json_encode( $settings ) . ';';
     1491    $defaults['multipart_params'] = $params;
     1492
     1493    $settings = array(
     1494        'defaults' => $defaults,
     1495        'browser'  => array(
     1496            'mobile'    => wp_is_mobile(),
     1497            'supported' => _device_can_upload(),
     1498        ),
     1499    );
     1500
     1501    $script = 'var _wpPluploadSettings = ' . json_encode( $settings ) . ';';
    14941502
    14951503    $data = $wp_scripts->get_data( 'wp-plupload', 'data' );
Note: See TracChangeset for help on using the changeset viewer.