External Libraries: Disable Flash backend for Plupload

Built from https://develop.svn.wordpress.org/branches/3.7@37368


git-svn-id: http://core.svn.wordpress.org/branches/3.7@37334 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Nikolay Bachiyski 2016-05-06 17:36:10 +00:00
parent 3d1fc411a1
commit f5195ba547
4 changed files with 8 additions and 5 deletions

View File

@ -1558,7 +1558,7 @@ $post_params = array(
$post_params = apply_filters( 'upload_post_params', $post_params ); // hook change! old name: 'swfupload_post_params'
$plupload_init = array(
'runtimes' => 'html5,silverlight,flash,html4',
'runtimes' => 'html5,silverlight,html4',
'browse_button' => 'plupload-browse-button',
'container' => 'plupload-upload-ui',
'drop_element' => 'drag-drop-area',

File diff suppressed because one or more lines are too long

View File

@ -1639,7 +1639,7 @@ function wp_plupload_default_settings() {
$max_upload_size = wp_max_upload_size();
$defaults = array(
'runtimes' => 'html5,silverlight,flash,html4',
'runtimes' => 'html5,silverlight,html4',
'file_data_name' => 'async-upload', // key passed to $_FILE.
'multiple_queues' => true,
'max_file_size' => $max_upload_size . 'b',

View File

@ -245,12 +245,15 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'plupload', '/wp-includes/js/plupload/plupload.js', array(), '1.5.7' );
$scripts->add( 'plupload-html5', '/wp-includes/js/plupload/plupload.html5.js', array('plupload'), '1.5.7' );
$scripts->add( 'plupload-flash', '/wp-includes/js/plupload/plupload.flash.js', array('plupload'), '1.5.7' );
// Not used, kept for dependency back-compat.
$scripts->add( 'plupload-flash', false, array(), '1.5.7' );
$scripts->add( 'plupload-silverlight', '/wp-includes/js/plupload/plupload.silverlight.js', array('plupload'), '1.5.7' );
$scripts->add( 'plupload-html4', '/wp-includes/js/plupload/plupload.html4.js', array('plupload'), '1.5.7' );
// cannot use the plupload.full.js, as it loads browserplus init JS from Yahoo
$scripts->add( 'plupload-all', false, array('plupload', 'plupload-html5', 'plupload-flash', 'plupload-silverlight', 'plupload-html4'), '1.5.7' );
$scripts->add( 'plupload-all', false, array('plupload', 'plupload-html5', 'plupload-silverlight', 'plupload-html4'), '1.5.7' );
$scripts->add( 'plupload-handlers', "/wp-includes/js/plupload/handlers$suffix.js", array('plupload-all', 'jquery') );
did_action( 'init' ) && $scripts->localize( 'plupload-handlers', 'pluploadL10n', $uploader_l10n );