WordPress.org

Make WordPress Core

Ticket #22552: 22552.2.diff

File 22552.2.diff, 1.8 KB (added by nacin, 5 years ago)

A more generic alternative.

  • wp-includes/js/media-models.js

     
    789789                }
    790790        });
    791791
     792        // Clean up. Prevents mobile browsers caching
     793        $(window).on('unload', function(){
     794                window.wp = null;
     795        });
     796
    792797}(jQuery));
     798 No newline at end of file
  • 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
  • wp-admin/admin-ajax.php

     
    3636@header( 'X-Robots-Tag: noindex' );
    3737
    3838send_nosniff_header();
     39nocache_headers();
    3940
    4041do_action( 'admin_init' );
    4142
  • wp-admin/includes/media.php

     
    15081508        'multipart_params' => $post_params
    15091509);
    15101510
     1511// Multi-file uploading doesn't currently work in iOS Safari,
     1512// single-file allows the built-in camera to be used as source for images
     1513if ( wp_is_mobile() )
     1514        $plupload_init['multi_selection'] = false;
     1515
    15111516$plupload_init = apply_filters( 'plupload_init', $plupload_init );
    15121517
    15131518?>