+do_action('pre-upload-ui');
+
+if ( $flash ) :
+
+// Set the post params, which SWFUpload will post back with the file, and pass
+// them through a filter.
+$post_params = array(
+ "post_id" => $post_id,
+ "auth_cookie" => (is_ssl() ? $_COOKIE[SECURE_AUTH_COOKIE] : $_COOKIE[AUTH_COOKIE]),
+ "logged_in_cookie" => $_COOKIE[LOGGED_IN_COOKIE],
+ "_wpnonce" => wp_create_nonce('media-form'),
+ "type" => $type,
+ "tab" => $tab,
+ "short" => "1",
+);
+$post_params = apply_filters( 'swfupload_post_params', $post_params );
+$p = array();
+foreach ( $post_params as $param => $val )
+ $p[] = "\t\t'$param' : '$val'";
+$post_params_str = implode( ", \n", $p );
+
+// #8545. wmode=transparent cannot be used with SWFUpload
+if ( 'media-new.php' == $pagenow ) {
+ $upload_image_path = get_user_option( 'admin_color' );
+ if ( 'classic' != $upload_image_path )
+ $upload_image_path = 'fresh';
+ $upload_image_path = admin_url( 'images/upload-' . $upload_image_path . '.png?ver=20101205' );
+} else {
+ $upload_image_path = includes_url( 'images/upload.png?ver=20100531' );
+}