Plupload: Restore 3.8 handles and filenames to avoid breaking plugins.
fixes #27763. Built from https://develop.svn.wordpress.org/trunk@28108 git-svn-id: http://core.svn.wordpress.org/trunk@27939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
55b0cd935e
commit
bfe44f07a3
|
@ -2168,8 +2168,8 @@ function wp_plupload_default_settings() {
|
|||
'runtimes' => 'html5,flash,silverlight,html4',
|
||||
'file_data_name' => 'async-upload', // key passed to $_FILE.
|
||||
'url' => admin_url( 'async-upload.php', 'relative' ),
|
||||
'flash_swf_url' => includes_url( 'js/plupload/Moxie.swf' ),
|
||||
'silverlight_xap_url' => includes_url( 'js/plupload/Moxie.xap' ),
|
||||
'flash_swf_url' => includes_url( 'js/plupload/plupload.flash.swf' ),
|
||||
'silverlight_xap_url' => includes_url( 'js/plupload/plupload.silverlight.xap' ),
|
||||
'filters' => array(
|
||||
'max_file_size' => $max_upload_size . 'b',
|
||||
),
|
||||
|
|
|
@ -266,14 +266,16 @@ function wp_default_scripts( &$scripts ) {
|
|||
'error_uploading' => __('“%s” has failed to upload.')
|
||||
);
|
||||
|
||||
// Back compat
|
||||
$scripts->add( 'plupload', '/wp-includes/js/plupload/plupload.full.min.js', array(), '2.1.1' );
|
||||
$scripts->add( 'plupload-all', '/wp-includes/js/plupload/plupload.full.min.js', array(), '2.1.1' );
|
||||
// Back compat handles:
|
||||
foreach ( array( 'all', 'html5', 'flash', 'silverlight', 'html4' ) as $handle ) {
|
||||
$scripts->add( "plupload-$handle", false, array( 'plupload' ), '2.1.1' );
|
||||
}
|
||||
|
||||
$scripts->add( 'plupload-handlers', "/wp-includes/js/plupload/handlers$suffix.js", array('plupload-all', 'jquery') );
|
||||
$scripts->add( 'plupload-handlers', "/wp-includes/js/plupload/handlers$suffix.js", array( 'plupload', 'jquery' ) );
|
||||
did_action( 'init' ) && $scripts->localize( 'plupload-handlers', 'pluploadL10n', $uploader_l10n );
|
||||
|
||||
$scripts->add( 'wp-plupload', "/wp-includes/js/plupload/wp-plupload$suffix.js", array('plupload-all', 'jquery', 'json2', 'media-models'), false, 1 );
|
||||
$scripts->add( 'wp-plupload', "/wp-includes/js/plupload/wp-plupload$suffix.js", array( 'plupload', 'jquery', 'json2', 'media-models' ), false, 1 );
|
||||
did_action( 'init' ) && $scripts->localize( 'wp-plupload', 'pluploadL10n', $uploader_l10n );
|
||||
|
||||
// keep 'swfupload' for back-compat.
|
||||
|
|
Loading…
Reference in New Issue