上下文搜索.swf
在核心,在/wp-admin/includes/media.php
:
$plupload_init = array(
\'runtimes\' => \'html5,silverlight,flash,html4\',
\'browse_button\' => \'plupload-browse-button\',
\'container\' => \'plupload-upload-ui\',
\'drop_element\' => \'drag-drop-area\',
\'file_data_name\' => \'async-upload\',
\'multiple_queues\' => true,
\'max_file_size\' => $max_upload_size . \'b\',
\'url\' => $upload_action_url,
\'flash_swf_url\' => includes_url(\'js/plupload/plupload.flash.swf\'),
\'silverlight_xap_url\' => includes_url(\'js/plupload/plupload.silverlight.xap\'),
\'filters\' => array( array(\'title\' => __( \'Allowed Files\' ), \'extensions\' => \'*\') ),
\'multipart\' => true,
\'urlstream_upload\' => true,
\'multipart_params\' => $post_params
);
$plupload_init = apply_filters( \'plupload_init\', $plupload_init );
应用以下过滤器挂钩似乎可以完成此工作:
(在WP 3.4.1中)add_filter(\'plupload_init\', \'wpse_38603_flash_uploader\', 10, 1);
function wpse_38603_flash_uploader( $plupload_init )
{
$plupload_init[\'runtimes\'] = \'flash,html5,silverlight,html4\';
return $plupload_init;
}