WordPress.org

Make WordPress Core

Ticket #22552: 22552-2.patch

File 22552-2.patch, 2.1 KB (added by azaozz, 17 months ago)
  • wp-admin/includes/media.php

     
    14981498        'multipart_params' => $post_params 
    14991499); 
    15001500 
     1501// Multi-file uploading doesn't currently work in iOS Safari, 
     1502// single-file allows the built-in camera to be used as source for images 
     1503if ( wp_is_mobile() ) 
     1504        $plupload_init['multi_selection'] = false; 
     1505 
    15011506$plupload_init = apply_filters( 'plupload_init', $plupload_init ); 
    15021507 
    15031508?> 
  • wp-includes/functions.php

     
    22732273 * @param mixed $response Variable (usually an array or object) to encode as JSON, then print and die. 
    22742274 */ 
    22752275function wp_send_json( $response ) { 
     2276        nocache_headers(); 
    22762277        @header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) ); 
     2278 
    22772279        echo json_encode( $response ); 
     2280 
    22782281        if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) 
    22792282                wp_die(); 
    22802283        else 
  • wp-includes/js/media-models.js

     
    789789                } 
    790790        }); 
    791791 
    792 }(jQuery)); 
    793  No newline at end of file 
     792        // Clean up. Prevents mobile browsers caching 
     793        $(window).on('unload', function(){ 
     794                window.wp = null; 
     795        }); 
     796 
     797}(jQuery)); 
  • wp-includes/media.php

     
    12541254                'multipart'           => true, 
    12551255                'urlstream_upload'    => true, 
    12561256        ); 
     1257         
     1258        // Multi-file uploading doesn't currently work in iOS Safari, 
     1259        // single-file allows the built-in camera to be used as source for images 
     1260        if ( wp_is_mobile() ) 
     1261                $defaults['multi_selection'] = false; 
    12571262 
    12581263        $defaults = apply_filters( 'plupload_default_settings', $defaults ); 
    12591264