Enable Media Replace - Version 2.0

Version Description

  • Replaced popup with inline navigation when replacing media
  • Added instructions in admin link under Media
Download this release

Release Info

Developer MungoBBQ
Plugin Icon 128x128 Enable Media Replace
Version 2.0
Comparing to
See all releases

Code changes from version 1.4.1 to 2.0

emr-list.png ADDED
Binary file
emr-preview.png ADDED
Binary file
enable-media-replace-sv_SE.mo CHANGED
Binary file
enable-media-replace-sv_SE.po CHANGED
@@ -2,7 +2,7 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: enable-media-replace\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2009-05-29 13:47+0100\n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: Måns Jonasson <mans@mansjonasson.se>\n"
8
  "Language-Team: \n"
@@ -13,83 +13,103 @@ msgstr ""
13
  "X-Poedit-Basepath: .\n"
14
  "X-Poedit-SearchPath-0: .\n"
15
 
16
- #: enable-media-replace.php:27
17
- #: enable-media-replace_sv_SE.php:27
 
 
 
 
18
  msgid "Replace media"
19
  msgstr "Ersätt media"
20
 
21
- #: enable-media-replace.php:27
22
- #: enable-media-replace_sv_SE.php:27
23
  msgid "Upload a new file"
24
  msgstr "Ladda upp en ny fil"
25
 
26
- #: enable-media-replace.php:27
27
- #: enable-media-replace_sv_SE.php:27
28
  msgid "To replace the current file, click the link and upload a replacement."
29
  msgstr "För att ersätta den nuvarande filen, klicka på länken och ladda upp en ny fil."
30
 
31
- #: popup.php:9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  #: upload.php:9
33
  msgid "You do not have permission to upload files."
34
  msgstr "Du har inte tillåtelse att ladda upp filer."
35
 
36
- #: popup.php:26
37
- msgid "Replace media upload"
38
- msgstr "Ladda upp ny fil"
39
-
40
- #: popup.php:36
41
  msgid "Replace Media Upload"
42
  msgstr "Ladda upp ny fil"
43
 
44
- #: popup.php:40
45
  msgid "NOTE: You are about to replace the media file"
46
  msgstr "OBS: Du är på väg att ersätta filen"
47
 
48
- #: popup.php:40
49
  msgid "There is no undo. Think about it!"
50
  msgstr "Det finns inget sätt att ångra. Tänk efter först!"
51
 
52
- #: popup.php:42
53
  msgid "Choose a file to upload from your computer"
54
  msgstr "Välj en fil att ladda upp från din dator"
55
 
56
- #: popup.php:46
57
  msgid "Select media replacement type:"
58
  msgstr "Välj ersättningsform:"
59
 
60
- #: popup.php:48
61
  msgid "Just replace the file"
62
  msgstr "Ersätt bara filen"
63
 
64
- #: popup.php:49
65
  msgid "Note: This option requires you to upload a file of the same type ("
66
  msgstr "Detta val kräver att du laddar upp en fil av exakt samma typ ("
67
 
68
- #: popup.php:49
69
  msgid ") as the one you are replacing. The name of the attachment will stay the same ("
70
  msgstr ") som den du ersätter. Namnet på filen kommer att behållas ("
71
 
72
- #: popup.php:49
73
  msgid ") no matter what the file you upload is called."
74
  msgstr ") oavsett vad filen du laddar upp heter på din dator."
75
 
76
- #: popup.php:51
77
  msgid "Replace the file, use new file name and update all links"
78
  msgstr "Ersätt filen, använd det nya filnamnet och uppdatera alla länkar"
79
 
80
- #: popup.php:52
81
  msgid "Note: If you check this option, the name and type of the file you are about to upload will replace the old file. All links pointing to the current file ("
82
  msgstr "Om du klickar i den här rutan kommer den även namnet och typen på den nya filen du laddar upp helt att ersätta den gamla. Alla länkar som pekar på den gamla filen ("
83
 
84
- #: popup.php:52
85
  msgid ") will be updated to point to the new file name."
86
  msgstr ") kommer att uppdateras så att de pekar på det nya filnamnet."
87
 
88
- #: popup.php:54
89
  msgid "Upload"
90
  msgstr "Ladda upp"
91
 
92
- #: popup.php:54
93
  msgid "Cancel"
94
  msgstr "Avbryt"
95
 
 
 
2
  msgstr ""
3
  "Project-Id-Version: enable-media-replace\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2010-05-17 16:43+0100\n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: Måns Jonasson <mans@mansjonasson.se>\n"
8
  "Language-Team: \n"
13
  "X-Poedit-Basepath: .\n"
14
  "X-Poedit-SearchPath-0: .\n"
15
 
16
+ #: enable-media-replace.php:26
17
+ msgid "Enable Media Replace"
18
+ msgstr "Ladda upp ny fil"
19
+
20
+ #: enable-media-replace.php:26
21
+ #: enable-media-replace.php:39
22
  msgid "Replace media"
23
  msgstr "Ersätt media"
24
 
25
+ #: enable-media-replace.php:39
 
26
  msgid "Upload a new file"
27
  msgstr "Ladda upp en ny fil"
28
 
29
+ #: enable-media-replace.php:39
 
30
  msgid "To replace the current file, click the link and upload a replacement."
31
  msgstr "För att ersätta den nuvarande filen, klicka på länken och ladda upp en ny fil."
32
 
33
+ #: enable-media-replace.php:53
34
+ msgid "This plugin allows you to replace any uploaded media file by uploading a new one."
35
+ msgstr "Detta plugin låter dig ersätta en fil i mediebiblioteket genom att ladda upp en ny."
36
+
37
+ #: enable-media-replace.php:55
38
+ msgid "First, locate the uploaded file you want to replace, using the"
39
+ msgstr "Hitta först den fil du vill ersätta genom att bläddra i "
40
+
41
+ #: enable-media-replace.php:55
42
+ msgid "media library browser"
43
+ msgstr "mediebiblioteket"
44
+
45
+ #: enable-media-replace.php:55
46
+ msgid "Click the \"Edit\" link"
47
+ msgstr "Tryck på \"Redigera\"-länken"
48
+
49
+ #: enable-media-replace.php:57
50
+ msgid "Second, click the link \"Upload a new file\" and follow the instructions."
51
+ msgstr "Tryck sen på länken \"Ladda upp ny fil\" och följ instruktionerna."
52
+
53
+ #: popup.php:6
54
  #: upload.php:9
55
  msgid "You do not have permission to upload files."
56
  msgstr "Du har inte tillåtelse att ladda upp filer."
57
 
58
+ #: popup.php:22
 
 
 
 
59
  msgid "Replace Media Upload"
60
  msgstr "Ladda upp ny fil"
61
 
62
+ #: popup.php:26
63
  msgid "NOTE: You are about to replace the media file"
64
  msgstr "OBS: Du är på väg att ersätta filen"
65
 
66
+ #: popup.php:26
67
  msgid "There is no undo. Think about it!"
68
  msgstr "Det finns inget sätt att ångra. Tänk efter först!"
69
 
70
+ #: popup.php:28
71
  msgid "Choose a file to upload from your computer"
72
  msgstr "Välj en fil att ladda upp från din dator"
73
 
74
+ #: popup.php:32
75
  msgid "Select media replacement type:"
76
  msgstr "Välj ersättningsform:"
77
 
78
+ #: popup.php:34
79
  msgid "Just replace the file"
80
  msgstr "Ersätt bara filen"
81
 
82
+ #: popup.php:35
83
  msgid "Note: This option requires you to upload a file of the same type ("
84
  msgstr "Detta val kräver att du laddar upp en fil av exakt samma typ ("
85
 
86
+ #: popup.php:35
87
  msgid ") as the one you are replacing. The name of the attachment will stay the same ("
88
  msgstr ") som den du ersätter. Namnet på filen kommer att behållas ("
89
 
90
+ #: popup.php:35
91
  msgid ") no matter what the file you upload is called."
92
  msgstr ") oavsett vad filen du laddar upp heter på din dator."
93
 
94
+ #: popup.php:37
95
  msgid "Replace the file, use new file name and update all links"
96
  msgstr "Ersätt filen, använd det nya filnamnet och uppdatera alla länkar"
97
 
98
+ #: popup.php:38
99
  msgid "Note: If you check this option, the name and type of the file you are about to upload will replace the old file. All links pointing to the current file ("
100
  msgstr "Om du klickar i den här rutan kommer den även namnet och typen på den nya filen du laddar upp helt att ersätta den gamla. Alla länkar som pekar på den gamla filen ("
101
 
102
+ #: popup.php:38
103
  msgid ") will be updated to point to the new file name."
104
  msgstr ") kommer att uppdateras så att de pekar på det nya filnamnet."
105
 
106
+ #: popup.php:40
107
  msgid "Upload"
108
  msgstr "Ladda upp"
109
 
110
+ #: popup.php:40
111
  msgid "Cancel"
112
  msgstr "Avbryt"
113
 
114
+ #~ msgid "Replace media upload"
115
+ #~ msgstr "Ladda upp ny fil"
enable-media-replace.mo CHANGED
Binary file
enable-media-replace.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Enable Media Replace
4
  Plugin URI: http://www.mansjonasson.se/enable-media-replace
5
  Description: Enable replacing media files by uploading a new file in the "Edit Media" section of the WordPress Media Library.
6
- Version: 1.4.1
7
  Author: Måns Jonasson
8
  Author URI: http://www.mansjonasson.se
9
 
@@ -14,9 +14,19 @@ http://www.gnu.org/licenses/gpl.html
14
  Developed for .SE (Stiftelsen för Internetinfrastruktur) - http://www.iis.se
15
  */
16
 
 
 
 
17
  add_action( 'init', 'enable_media_replace_init' );
 
18
  add_filter('attachment_fields_to_edit', 'enable_media_replace', 10, 2);
19
 
 
 
 
 
 
 
20
  // Initialize this plugin. Called by 'init' hook.
21
  function enable_media_replace_init() {
22
  load_plugin_textdomain( 'enable-media-replace', '/wp-content/plugins/enable-media-replace' );
@@ -24,14 +34,31 @@ function enable_media_replace_init() {
24
 
25
  function enable_media_replace( $form_fields, $post ) {
26
  if ($_GET["attachment_id"]) {
27
- $popupurl = plugins_url("popup.php?attachment_id={$_GET["attachment_id"]}", __FILE__);
28
-
29
- $link = "href=\"#\" onclick=\"window.open('$popupurl', 'enable_media_replace_popup', 'width=500,height=500');\"";
30
  $form_fields["enable-media-replace"] = array("label" => __("Replace media", "enable-media-replace"), "input" => "html", "html" => "<p><a $link>" . __("Upload a new file", "enable-media-replace") . "</a></p>", "helps" => __("To replace the current file, click the link and upload a replacement.", "enable-media-replace"));
31
  }
32
  return $form_fields;
33
  }
34
 
35
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
  ?>
3
  Plugin Name: Enable Media Replace
4
  Plugin URI: http://www.mansjonasson.se/enable-media-replace
5
  Description: Enable replacing media files by uploading a new file in the "Edit Media" section of the WordPress Media Library.
6
+ Version: 2.0
7
  Author: Måns Jonasson
8
  Author URI: http://www.mansjonasson.se
9
 
14
  Developed for .SE (Stiftelsen för Internetinfrastruktur) - http://www.iis.se
15
  */
16
 
17
+ ini_set("display_errors", "on");
18
+
19
+
20
  add_action( 'init', 'enable_media_replace_init' );
21
+ add_action('admin_menu', 'emr_menu');
22
  add_filter('attachment_fields_to_edit', 'enable_media_replace', 10, 2);
23
 
24
+
25
+ function emr_menu() {
26
+ add_submenu_page('upload.php', __("Enable Media Replace", "enable-media-replace"), __("Replace media", "enable-media-replace"), 4, __FILE__, 'emr_options');
27
+ }
28
+
29
+
30
  // Initialize this plugin. Called by 'init' hook.
31
  function enable_media_replace_init() {
32
  load_plugin_textdomain( 'enable-media-replace', '/wp-content/plugins/enable-media-replace' );
34
 
35
  function enable_media_replace( $form_fields, $post ) {
36
  if ($_GET["attachment_id"]) {
37
+ $editurl = get_bloginfo("wpurl") . "/wp-admin/upload.php?page=enable-media-replace/enable-media-replace.php&attachment_id={$_GET["attachment_id"]}";
38
+ $link = "href=\"$editurl\"";
 
39
  $form_fields["enable-media-replace"] = array("label" => __("Replace media", "enable-media-replace"), "input" => "html", "html" => "<p><a $link>" . __("Upload a new file", "enable-media-replace") . "</a></p>", "helps" => __("To replace the current file, click the link and upload a replacement.", "enable-media-replace"));
40
  }
41
  return $form_fields;
42
  }
43
 
44
+ function emr_options() {
45
+ if ($_GET["attachment_id"] > 0) {
46
+ include("popup.php");
47
+ }
48
+
49
+ else {
50
+ ?>
51
+ <div class="wrap">
52
+ <h2>Enable media replace</h2>
53
+ <p><?php _e("This plugin allows you to replace any uploaded media file by uploading a new one.", "enable-media-replace"); ?></p>
54
+ <img src="<?php echo plugins_url("enable-media-replace/emr-list.png"); ?>" alt="Preview of Enable Media Replace link" />
55
+ <p>&nbsp;&nbsp;&nbsp;&nbsp;<?php _e("First, locate the uploaded file you want to replace, using the", "enable-media-replace");?> <a href="<?php echo get_bloginfo("wpurl") . "/wp-admin/upload.php";?>"><?php _e("media library browser", "enable-media-replace");?></a>. <?php _e("Click the \"Edit\" link", "enable-media-replace");?>.</p>
56
+ <img style="margin-top: 20px;" src="<?php echo plugins_url("enable-media-replace/emr-preview.png"); ?>" alt="Preview of Enable Media Replace link" />
57
+ <p>&nbsp;&nbsp;&nbsp;&nbsp;<?php _e("Second, click the link \"Upload a new file\" and follow the instructions.", "enable-media-replace");?></p>
58
+ </div>
59
+
60
+ <?php
61
+ }
62
+ }
63
 
64
  ?>
enable-media-replace.po CHANGED
@@ -2,7 +2,7 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: enable-media-replace\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2009-05-29 13:49+0100\n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: Måns Jonasson <mans@mansjonasson.se>\n"
8
  "Language-Team: \n"
@@ -13,83 +13,101 @@ msgstr ""
13
  "X-Poedit-Basepath: .\n"
14
  "X-Poedit-SearchPath-0: .\n"
15
 
16
- #: enable-media-replace.php:27
17
- #: enable-media-replace_sv_SE.php:27
 
 
 
 
18
  msgid "Replace media"
19
  msgstr ""
20
 
21
- #: enable-media-replace.php:27
22
- #: enable-media-replace_sv_SE.php:27
23
  msgid "Upload a new file"
24
  msgstr ""
25
 
26
- #: enable-media-replace.php:27
27
- #: enable-media-replace_sv_SE.php:27
28
  msgid "To replace the current file, click the link and upload a replacement."
29
  msgstr ""
30
 
31
- #: popup.php:9
32
- #: upload.php:9
33
- msgid "You do not have permission to upload files."
34
  msgstr ""
35
 
36
- #: popup.php:26
37
- msgid "Replace media upload"
 
 
 
 
 
 
 
 
 
 
 
 
38
  msgstr ""
39
 
40
- #: popup.php:36
 
 
 
 
 
41
  msgid "Replace Media Upload"
42
  msgstr ""
43
 
44
- #: popup.php:40
45
  msgid "NOTE: You are about to replace the media file"
46
  msgstr ""
47
 
48
- #: popup.php:40
49
  msgid "There is no undo. Think about it!"
50
  msgstr ""
51
 
52
- #: popup.php:42
53
  msgid "Choose a file to upload from your computer"
54
  msgstr ""
55
 
56
- #: popup.php:46
57
  msgid "Select media replacement type:"
58
  msgstr ""
59
 
60
- #: popup.php:48
61
  msgid "Just replace the file"
62
  msgstr ""
63
 
64
- #: popup.php:49
65
  msgid "Note: This option requires you to upload a file of the same type ("
66
  msgstr ""
67
 
68
- #: popup.php:49
69
  msgid ") as the one you are replacing. The name of the attachment will stay the same ("
70
  msgstr ""
71
 
72
- #: popup.php:49
73
  msgid ") no matter what the file you upload is called."
74
  msgstr ""
75
 
76
- #: popup.php:51
77
  msgid "Replace the file, use new file name and update all links"
78
  msgstr ""
79
 
80
- #: popup.php:52
81
  msgid "Note: If you check this option, the name and type of the file you are about to upload will replace the old file. All links pointing to the current file ("
82
  msgstr ""
83
 
84
- #: popup.php:52
85
  msgid ") will be updated to point to the new file name."
86
  msgstr ""
87
 
88
- #: popup.php:54
89
  msgid "Upload"
90
  msgstr ""
91
 
92
- #: popup.php:54
93
  msgid "Cancel"
94
  msgstr ""
95
 
2
  msgstr ""
3
  "Project-Id-Version: enable-media-replace\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2010-05-17 16:43+0100\n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: Måns Jonasson <mans@mansjonasson.se>\n"
8
  "Language-Team: \n"
13
  "X-Poedit-Basepath: .\n"
14
  "X-Poedit-SearchPath-0: .\n"
15
 
16
+ #: enable-media-replace.php:26
17
+ msgid "Enable Media Replace"
18
+ msgstr ""
19
+
20
+ #: enable-media-replace.php:26
21
+ #: enable-media-replace.php:39
22
  msgid "Replace media"
23
  msgstr ""
24
 
25
+ #: enable-media-replace.php:39
 
26
  msgid "Upload a new file"
27
  msgstr ""
28
 
29
+ #: enable-media-replace.php:39
 
30
  msgid "To replace the current file, click the link and upload a replacement."
31
  msgstr ""
32
 
33
+ #: enable-media-replace.php:53
34
+ msgid "This plugin allows you to replace any uploaded media file by uploading a new one."
 
35
  msgstr ""
36
 
37
+ #: enable-media-replace.php:55
38
+ msgid "First, locate the uploaded file you want to replace, using the"
39
+ msgstr ""
40
+
41
+ #: enable-media-replace.php:55
42
+ msgid "media library browser"
43
+ msgstr ""
44
+
45
+ #: enable-media-replace.php:55
46
+ msgid "Click the \"Edit\" link"
47
+ msgstr ""
48
+
49
+ #: enable-media-replace.php:57
50
+ msgid "Second, click the link \"Upload a new file\" and follow the instructions."
51
  msgstr ""
52
 
53
+ #: popup.php:6
54
+ #: upload.php:9
55
+ msgid "You do not have permission to upload files."
56
+ msgstr ""
57
+
58
+ #: popup.php:22
59
  msgid "Replace Media Upload"
60
  msgstr ""
61
 
62
+ #: popup.php:26
63
  msgid "NOTE: You are about to replace the media file"
64
  msgstr ""
65
 
66
+ #: popup.php:26
67
  msgid "There is no undo. Think about it!"
68
  msgstr ""
69
 
70
+ #: popup.php:28
71
  msgid "Choose a file to upload from your computer"
72
  msgstr ""
73
 
74
+ #: popup.php:32
75
  msgid "Select media replacement type:"
76
  msgstr ""
77
 
78
+ #: popup.php:34
79
  msgid "Just replace the file"
80
  msgstr ""
81
 
82
+ #: popup.php:35
83
  msgid "Note: This option requires you to upload a file of the same type ("
84
  msgstr ""
85
 
86
+ #: popup.php:35
87
  msgid ") as the one you are replacing. The name of the attachment will stay the same ("
88
  msgstr ""
89
 
90
+ #: popup.php:35
91
  msgid ") no matter what the file you upload is called."
92
  msgstr ""
93
 
94
+ #: popup.php:37
95
  msgid "Replace the file, use new file name and update all links"
96
  msgstr ""
97
 
98
+ #: popup.php:38
99
  msgid "Note: If you check this option, the name and type of the file you are about to upload will replace the old file. All links pointing to the current file ("
100
  msgstr ""
101
 
102
+ #: popup.php:38
103
  msgid ") will be updated to point to the new file name."
104
  msgstr ""
105
 
106
+ #: popup.php:40
107
  msgid "Upload"
108
  msgstr ""
109
 
110
+ #: popup.php:40
111
  msgid "Cancel"
112
  msgstr ""
113
 
popup.php CHANGED
@@ -2,14 +2,9 @@
2
 
3
  $wppath = str_replace("wp-content/plugins/enable-media-replace/popup.php", "", __FILE__);
4
 
5
- require_once($wppath . "wp-load.php");
6
- require_once($wppath . "wp-admin/admin.php");
7
-
8
  if (!current_user_can('upload_files'))
9
  wp_die(__('You do not have permission to upload files.', 'enable-media-replace'));
10
 
11
- @header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
12
-
13
  global $wpdb;
14
 
15
  $table_name = $wpdb->prefix . "posts";
@@ -21,16 +16,7 @@ list($current_filename, $current_filetype) = mysql_fetch_array(mysql_query($sql)
21
  $current_filename = substr($current_filename, (strrpos($current_filename, "/") + 1));
22
 
23
 
24
- ?><html>
25
- <head>
26
- <title><?php echo __("Replace media upload"); ?></title>
27
-
28
- <link rel='stylesheet' href='<?php echo get_bloginfo("wpurl");?>/wp-admin/css/global.css?ver=20081210' type='text/css' media='all' />
29
- <link rel='stylesheet' href='<?php echo get_bloginfo("wpurl");?>/wp-admin/wp-admin.css?ver=20081210' type='text/css' media='all' />
30
- <link rel='stylesheet' href='<?php echo get_bloginfo("wpurl");?>/wp-admin/css/colors-fresh.css?ver=20081210' type='text/css' media='all' />
31
- <link rel='stylesheet' href='<?php echo get_bloginfo("wpurl");?>/wp-admin/css/media.css?ver=20081210' type='text/css' media='all' />
32
- </head>
33
- <body id="media-upload">
34
  <div class="wrap">
35
  <div id="icon-upload" class="icon32"><br /></div>
36
  <h2><?php echo __("Replace Media Upload", "enable-media-replace"); ?></h2>
@@ -55,5 +41,3 @@ $current_filename = substr($current_filename, (strrpos($current_filename, "/") +
55
 
56
  </form>
57
  </div>
58
- </body>
59
- </html>
2
 
3
  $wppath = str_replace("wp-content/plugins/enable-media-replace/popup.php", "", __FILE__);
4
 
 
 
 
5
  if (!current_user_can('upload_files'))
6
  wp_die(__('You do not have permission to upload files.', 'enable-media-replace'));
7
 
 
 
8
  global $wpdb;
9
 
10
  $table_name = $wpdb->prefix . "posts";
16
  $current_filename = substr($current_filename, (strrpos($current_filename, "/") + 1));
17
 
18
 
19
+ ?>
 
 
 
 
 
 
 
 
 
20
  <div class="wrap">
21
  <div id="icon-upload" class="icon32"><br /></div>
22
  <h2><?php echo __("Replace Media Upload", "enable-media-replace"); ?></h2>
41
 
42
  </form>
43
  </div>
 
 
readme.txt CHANGED
@@ -22,6 +22,10 @@ This plugin is very powerful and a must-have for any larger sites built with Wor
22
 
23
  == Changelog ==
24
 
 
 
 
 
25
  = 1.4.1 =
26
  * Tested with WordPress 3.0 beta 2
27
 
22
 
23
  == Changelog ==
24
 
25
+ = 2.0 =
26
+ * Replaced popup with inline navigation when replacing media
27
+ * Added instructions in admin link under Media
28
+
29
  = 1.4.1 =
30
  * Tested with WordPress 3.0 beta 2
31
 
upload.php CHANGED
@@ -105,5 +105,8 @@ if (is_uploaded_file($_FILES["userfile"]["tmp_name"])) {
105
  }
106
 
107
  }
 
 
 
108
 
109
- ?><html><head></head><body><script type="text/javascript">window.close();window.opener.location.reload();</script></body></html>
105
  }
106
 
107
  }
108
+
109
+ #header("Location: " . get_bloginfo("wpurl") . "/wp-admin/media.php?attachment_id={$_POST["ID"]}&action=edit");
110
+ header("Location: " . get_bloginfo("wpurl") . "/wp-admin/upload.php?posted=3");
111
 
112
+ ?>