diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 0f9d74f700..3c945de05a 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -1225,7 +1225,7 @@ jQuery(function($){ button_height: "24", button_width: "132", button_image_url: '', - button_placeholder_id: "async-upload-wrap", + button_placeholder_id: "flash-browse-button", upload_url : "", flash_url : "", file_post_name: "async-upload", @@ -1239,8 +1239,6 @@ jQuery(function($){ "short" : "1" }, file_size_limit : "b", - swfupload_element_id : "flash-upload-ui", // id of the element displayed when swfupload is available - degraded_element_id : "html-upload-ui", // when swfupload is unavailable file_dialog_start_handler : fileDialogStart, file_queued_handler : fileQueued, upload_start_handler : uploadStart, @@ -1252,7 +1250,10 @@ jQuery(function($){ file_dialog_complete_handler : fileDialogComplete, swfupload_pre_load_handler: swfuploadPreLoad, swfupload_load_failed_handler: swfuploadLoadFailed, - + custom_settings : { + degraded_element_id : "html-upload-ui", // id of the element displayed when swfupload is unavailable + swfupload_element_id : "flash-upload-ui", // id of the element displayed when swfupload is available + }, debug: false }); $("#flash-browse-button").bind( "click", function(){swfu.selectFiles();}); @@ -1262,7 +1263,8 @@ jQuery(function($){
-

+
+

@@ -1845,8 +1847,6 @@ function media_upload_flash_bypass() { echo '

'; } -add_action('post-flash-upload-ui', 'media_upload_flash_bypass'); - /** * {@internal Missing Short Description}} * diff --git a/wp-includes/js/swfupload/handlers.js b/wp-includes/js/swfupload/handlers.js index 8842f13195..73f354eefd 100644 --- a/wp-includes/js/swfupload/handlers.js +++ b/wp-includes/js/swfupload/handlers.js @@ -206,11 +206,13 @@ function fileDialogComplete(num_files_queued) { } function swfuploadPreLoad() { - return true; + jQuery('#' + swfu.customSettings.degraded_element_id).hide(); + jQuery('#' + swfu.customSettings.swfupload_element_id).show(); } function swfuploadLoadFailed() { - return true; + jQuery('#' + swfu.customSettings.swfupload_element_id).hide(); + jQuery('#' + swfu.customSettings.degraded_element_id).show(); } function uploadError(fileObj, error_code, message) {