Enable Media Replace - Version 3.2.1

Version Description

  • Bugfix, typo made metadata changes (thanks GitHub user icecandy!)
  • Removed Shortpixel links and images
Download this release

Release Info

Developer ShortPixel
Plugin Icon 128x128 Enable Media Replace
Version 3.2.1
Comparing to
See all releases

Code changes from version 3.2 to 3.2.1

Files changed (36) hide show
  1. enable-media-replace.php +1 -20
  2. popup.php +0 -23
  3. readme.txt +10 -5
  4. trunk/LICENSE +0 -339
  5. trunk/README.md +0 -31
  6. trunk/enable-media-replace.php +0 -181
  7. trunk/img/sp.png +0 -0
  8. trunk/languages/enable-media-replace-da_DK.mo +0 -0
  9. trunk/languages/enable-media-replace-da_DK.po +0 -89
  10. trunk/languages/enable-media-replace-de_DE.mo +0 -0
  11. trunk/languages/enable-media-replace-de_DE.po +0 -89
  12. trunk/languages/enable-media-replace-fr_FR.mo +0 -0
  13. trunk/languages/enable-media-replace-fr_FR.po +0 -93
  14. trunk/languages/enable-media-replace-it_IT.mo +0 -0
  15. trunk/languages/enable-media-replace-it_IT.po +0 -95
  16. trunk/languages/enable-media-replace-ja.mo +0 -0
  17. trunk/languages/enable-media-replace-ja.po +0 -114
  18. trunk/languages/enable-media-replace-nl_NL.mo +0 -0
  19. trunk/languages/enable-media-replace-nl_NL.po +0 -89
  20. trunk/languages/enable-media-replace-pt_BR.mo +0 -0
  21. trunk/languages/enable-media-replace-pt_BR.po +0 -98
  22. trunk/languages/enable-media-replace-pt_PT.mo +0 -0
  23. trunk/languages/enable-media-replace-pt_PT.po +0 -151
  24. trunk/languages/enable-media-replace-ru_RU.mo +0 -0
  25. trunk/languages/enable-media-replace-ru_RU.po +0 -95
  26. trunk/languages/enable-media-replace-sv_SE.mo +0 -0
  27. trunk/languages/enable-media-replace-sv_SE.po +0 -149
  28. trunk/languages/enable-media-replace-zh_CN.mo +0 -0
  29. trunk/languages/enable-media-replace-zh_CN.po +0 -119
  30. trunk/languages/enable-media-replace.mo +0 -0
  31. trunk/languages/enable-media-replace.po +0 -117
  32. trunk/notice.php +0 -31
  33. trunk/popup.php +0 -69
  34. trunk/readme.txt +0 -227
  35. trunk/upload.php +0 -360
  36. upload.php +39 -22
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: 3.2
7
  Author: Måns Jonasson
8
  Author URI: http://www.mansjonasson.se
9
 
@@ -28,9 +28,6 @@ add_action('admin_menu', 'emr_menu');
28
  add_filter('attachment_fields_to_edit', 'enable_media_replace', 10, 2);
29
  add_filter('media_row_actions', 'add_media_action', 10, 2);
30
 
31
- add_action('admin_notices', 'emr_display_notices');
32
- add_action('wp_ajax_emr_dismiss_notices', 'emr_dismiss_notices');
33
-
34
  add_shortcode('file_modified', 'emr_get_modified_date');
35
 
36
  /**
@@ -161,19 +158,3 @@ function ua_admin_date_replaced_media_on_edit_media_screen() {
161
  <?php
162
  }
163
  add_action( 'attachment_submitbox_misc_actions', 'ua_admin_date_replaced_media_on_edit_media_screen', 91 );
164
-
165
- /*----------------------------------------------------------------------------------------------------------
166
- Display/dismiss admin notices if needed
167
- -----------------------------------------------------------------------------------------------------------*/
168
-
169
- function emr_display_notices() {
170
- if(!get_option( 'emr_news') && !is_plugin_active('shortpixel-image-optimiser/wp-shortpixel.php')
171
- && current_action() != "media_page_enable-media-replace/enable-media-replace") {
172
- require_once( str_replace("enable-media-replace.php", "notice.php", __FILE__) );
173
- }
174
- }
175
-
176
- function emr_dismiss_notices() {
177
- update_option( 'emr_news', true);
178
- return json_encode(array("Status" => 0));
179
- }
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: 3.2.1
7
  Author: Måns Jonasson
8
  Author URI: http://www.mansjonasson.se
9
 
28
  add_filter('attachment_fields_to_edit', 'enable_media_replace', 10, 2);
29
  add_filter('media_row_actions', 'add_media_action', 10, 2);
30
 
 
 
 
31
  add_shortcode('file_modified', 'emr_get_modified_date');
32
 
33
  /**
158
  <?php
159
  }
160
  add_action( 'attachment_submitbox_misc_actions', 'ua_admin_date_replaced_media_on_edit_media_screen', 91 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popup.php CHANGED
@@ -44,29 +44,6 @@ $current_filename = substr($current_filename, (strrpos($current_filename, "/") +
44
  <input type="hidden" name="ID" value="<?php echo (int) $_GET["attachment_id"]; ?>" />
45
  <div id="message" class="updated notice notice-success is-dismissible"><p><?php printf( __('NOTE: You are about to replace the media file "%s". There is no undo. Think about it!', "enable-media-replace"), $current_filename ); ?></p></div>
46
 
47
-
48
- <div style="background: #fff;width: 250px;min-height: 270px;border: 1px solid #ccc;float: right;padding: 15px;position: relative;margin: 0 0 10px 10px;">
49
- <h3 class="" style="margin-top: 0;text-align: center;">
50
- <a href="https://shortpixel.com/h/af/VKG6LYN28044" target="_blank">
51
- <?php _e("Optimize your images with ShortPixel, get +50% credits!", "enable-media-replace"); ?>
52
- </a>
53
- </h3>
54
- <div class="" style="text-align: center;">
55
- <a href="https://shortpixel.com/h/af/VKG6LYN28044" target="_blank">
56
- <img src="https://optimizingmattersblog.files.wordpress.com/2016/10/shortpixel.png">
57
- </a>
58
- </div>
59
- <div class="" style="margin-bottom: 10px;">
60
- <?php _e("Get more Google love by compressing your site's images! Check out how much ShortPixel can save your site and get +50% credits when signing up as an Enable Media Replace user! Forever!", "enable-media-replace"); ?>
61
- </div>
62
- <div class=""><div style="text-align: right;">
63
- <a class="button button-secondary" href="https://shortpixel.com/h/af/VKG6LYN28044" target="_blank">
64
- <?php _e("More info", "enable-media-replace"); ?></p>
65
- </a>
66
- </div>
67
- </div>
68
- </div>
69
-
70
  <p><?php echo __("Choose a file to upload from your computer", "enable-media-replace"); ?></p>
71
 
72
  <input type="file" name="userfile" />
44
  <input type="hidden" name="ID" value="<?php echo (int) $_GET["attachment_id"]; ?>" />
45
  <div id="message" class="updated notice notice-success is-dismissible"><p><?php printf( __('NOTE: You are about to replace the media file "%s". There is no undo. Think about it!', "enable-media-replace"), $current_filename ); ?></p></div>
46
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  <p><?php echo __("Choose a file to upload from your computer", "enable-media-replace"); ?></p>
48
 
49
  <input type="file" name="userfile" />
readme.txt CHANGED
@@ -1,5 +1,5 @@
1
  === Enable Media Replace ===
2
- Contributors: mungobbq
3
  Tags: admin, attachment, media, files
4
  Requires at least: 4.0
5
  Tested up to: 4.9.4
@@ -37,15 +37,20 @@ If you want more control over the format used to display the time, you can use t
37
 
38
  == Changelog ==
39
 
 
 
 
 
40
  = 3.2 =
41
  * Tested with WP 4.9.4
 
42
 
43
  = 3.1.1 =
44
  * Fixed bug introduced in an earlier version, preventing the updating of URLs on pages/posts if the link did not contain the domain name
45
 
46
  = 3.1 =
47
  * Got rid of some pesky old code, and added some better filtering options, thanks to GitHub users speerface, aaemnnosttv, and ururk
48
- * Brand new, shiny code to replace other image sizes in embeded media, thanks to GitHub user ianmjones!
49
  * Tested with WP 4.8
50
 
51
  = 3.0.6 =
@@ -80,8 +85,8 @@ If you want more control over the format used to display the time, you can use t
80
  * Now inheriting permissions of the replaced files, [Thank you Fiwad](https://github.com/fiwad)
81
 
82
  = 2.9.7RC1 =
83
- * Moved localization files into own directory. [Thank you Michael](https://github.com/michael-cannon)
84
- * Moved screensots into own directory. [Thank you Michael](https://github.com/michael-cannon)
85
 
86
  = 2.9.6 =
87
  * Added fix by Grant K Norwood to address a possible security problem in SQL statements. Thanks Grant!
@@ -124,7 +129,7 @@ If you want more control over the format used to display the time, you can use t
124
  = 2.8 =
125
  * New and safer method for deleting thumbnails when a new image file is uploaded.
126
  * New translations for simplified Chinese (thanks Tunghsiao Liu) and Italian (grazie Marco Chiesi)
127
- * Added method for detecting upload screen to ensure backwards compatibility with versions pre 3.5
128
 
129
  = 2.7 =
130
  * A couple of changes made to ensure compatibility with WordPress 3.5. Thanks to Elizabeth Powell for the fixes!
1
  === Enable Media Replace ===
2
+ Contributors: ShortPixel
3
  Tags: admin, attachment, media, files
4
  Requires at least: 4.0
5
  Tested up to: 4.9.4
37
 
38
  == Changelog ==
39
 
40
+ = 3.2.1 =
41
+ * Bugfix, typo made metadata changes (thanks GitHub user icecandy!)
42
+ * Removed Shortpixel links and images
43
+
44
  = 3.2 =
45
  * Tested with WP 4.9.4
46
+ * Added Shortpixel link in replace media screen
47
 
48
  = 3.1.1 =
49
  * Fixed bug introduced in an earlier version, preventing the updating of URLs on pages/posts if the link did not contain the domain name
50
 
51
  = 3.1 =
52
  * Got rid of some pesky old code, and added some better filtering options, thanks to GitHub users speerface, aaemnnosttv, and ururk
53
+ * Brand new, shiny code to replace other image sizes in embedded media, thanks to GitHub user ianmjones!
54
  * Tested with WP 4.8
55
 
56
  = 3.0.6 =
85
  * Now inheriting permissions of the replaced files, [Thank you Fiwad](https://github.com/fiwad)
86
 
87
  = 2.9.7RC1 =
88
+ * Moved localization files into their own directory. [Thank you Michael](https://github.com/michael-cannon)
89
+ * Moved screenshots into their own directory. [Thank you Michael](https://github.com/michael-cannon)
90
 
91
  = 2.9.6 =
92
  * Added fix by Grant K Norwood to address a possible security problem in SQL statements. Thanks Grant!
129
  = 2.8 =
130
  * New and safer method for deleting thumbnails when a new image file is uploaded.
131
  * New translations for simplified Chinese (thanks Tunghsiao Liu) and Italian (grazie Marco Chiesi)
132
+ * Added method for detecting upload screen to ensure backward compatibility with versions pre 3.5
133
 
134
  = 2.7 =
135
  * A couple of changes made to ensure compatibility with WordPress 3.5. Thanks to Elizabeth Powell for the fixes!
trunk/LICENSE DELETED
@@ -1,339 +0,0 @@
1
- GNU GENERAL PUBLIC LICENSE
2
- Version 2, June 1991
3
-
4
- Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
5
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6
- Everyone is permitted to copy and distribute verbatim copies
7
- of this license document, but changing it is not allowed.
8
-
9
- Preamble
10
-
11
- The licenses for most software are designed to take away your
12
- freedom to share and change it. By contrast, the GNU General Public
13
- License is intended to guarantee your freedom to share and change free
14
- software--to make sure the software is free for all its users. This
15
- General Public License applies to most of the Free Software
16
- Foundation's software and to any other program whose authors commit to
17
- using it. (Some other Free Software Foundation software is covered by
18
- the GNU Lesser General Public License instead.) You can apply it to
19
- your programs, too.
20
-
21
- When we speak of free software, we are referring to freedom, not
22
- price. Our General Public Licenses are designed to make sure that you
23
- have the freedom to distribute copies of free software (and charge for
24
- this service if you wish), that you receive source code or can get it
25
- if you want it, that you can change the software or use pieces of it
26
- in new free programs; and that you know you can do these things.
27
-
28
- To protect your rights, we need to make restrictions that forbid
29
- anyone to deny you these rights or to ask you to surrender the rights.
30
- These restrictions translate to certain responsibilities for you if you
31
- distribute copies of the software, or if you modify it.
32
-
33
- For example, if you distribute copies of such a program, whether
34
- gratis or for a fee, you must give the recipients all the rights that
35
- you have. You must make sure that they, too, receive or can get the
36
- source code. And you must show them these terms so they know their
37
- rights.
38
-
39
- We protect your rights with two steps: (1) copyright the software, and
40
- (2) offer you this license which gives you legal permission to copy,
41
- distribute and/or modify the software.
42
-
43
- Also, for each author's protection and ours, we want to make certain
44
- that everyone understands that there is no warranty for this free
45
- software. If the software is modified by someone else and passed on, we
46
- want its recipients to know that what they have is not the original, so
47
- that any problems introduced by others will not reflect on the original
48
- authors' reputations.
49
-
50
- Finally, any free program is threatened constantly by software
51
- patents. We wish to avoid the danger that redistributors of a free
52
- program will individually obtain patent licenses, in effect making the
53
- program proprietary. To prevent this, we have made it clear that any
54
- patent must be licensed for everyone's free use or not licensed at all.
55
-
56
- The precise terms and conditions for copying, distribution and
57
- modification follow.
58
-
59
- GNU GENERAL PUBLIC LICENSE
60
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
-
62
- 0. This License applies to any program or other work which contains
63
- a notice placed by the copyright holder saying it may be distributed
64
- under the terms of this General Public License. The "Program", below,
65
- refers to any such program or work, and a "work based on the Program"
66
- means either the Program or any derivative work under copyright law:
67
- that is to say, a work containing the Program or a portion of it,
68
- either verbatim or with modifications and/or translated into another
69
- language. (Hereinafter, translation is included without limitation in
70
- the term "modification".) Each licensee is addressed as "you".
71
-
72
- Activities other than copying, distribution and modification are not
73
- covered by this License; they are outside its scope. The act of
74
- running the Program is not restricted, and the output from the Program
75
- is covered only if its contents constitute a work based on the
76
- Program (independent of having been made by running the Program).
77
- Whether that is true depends on what the Program does.
78
-
79
- 1. You may copy and distribute verbatim copies of the Program's
80
- source code as you receive it, in any medium, provided that you
81
- conspicuously and appropriately publish on each copy an appropriate
82
- copyright notice and disclaimer of warranty; keep intact all the
83
- notices that refer to this License and to the absence of any warranty;
84
- and give any other recipients of the Program a copy of this License
85
- along with the Program.
86
-
87
- You may charge a fee for the physical act of transferring a copy, and
88
- you may at your option offer warranty protection in exchange for a fee.
89
-
90
- 2. You may modify your copy or copies of the Program or any portion
91
- of it, thus forming a work based on the Program, and copy and
92
- distribute such modifications or work under the terms of Section 1
93
- above, provided that you also meet all of these conditions:
94
-
95
- a) You must cause the modified files to carry prominent notices
96
- stating that you changed the files and the date of any change.
97
-
98
- b) You must cause any work that you distribute or publish, that in
99
- whole or in part contains or is derived from the Program or any
100
- part thereof, to be licensed as a whole at no charge to all third
101
- parties under the terms of this License.
102
-
103
- c) If the modified program normally reads commands interactively
104
- when run, you must cause it, when started running for such
105
- interactive use in the most ordinary way, to print or display an
106
- announcement including an appropriate copyright notice and a
107
- notice that there is no warranty (or else, saying that you provide
108
- a warranty) and that users may redistribute the program under
109
- these conditions, and telling the user how to view a copy of this
110
- License. (Exception: if the Program itself is interactive but
111
- does not normally print such an announcement, your work based on
112
- the Program is not required to print an announcement.)
113
-
114
- These requirements apply to the modified work as a whole. If
115
- identifiable sections of that work are not derived from the Program,
116
- and can be reasonably considered independent and separate works in
117
- themselves, then this License, and its terms, do not apply to those
118
- sections when you distribute them as separate works. But when you
119
- distribute the same sections as part of a whole which is a work based
120
- on the Program, the distribution of the whole must be on the terms of
121
- this License, whose permissions for other licensees extend to the
122
- entire whole, and thus to each and every part regardless of who wrote it.
123
-
124
- Thus, it is not the intent of this section to claim rights or contest
125
- your rights to work written entirely by you; rather, the intent is to
126
- exercise the right to control the distribution of derivative or
127
- collective works based on the Program.
128
-
129
- In addition, mere aggregation of another work not based on the Program
130
- with the Program (or with a work based on the Program) on a volume of
131
- a storage or distribution medium does not bring the other work under
132
- the scope of this License.
133
-
134
- 3. You may copy and distribute the Program (or a work based on it,
135
- under Section 2) in object code or executable form under the terms of
136
- Sections 1 and 2 above provided that you also do one of the following:
137
-
138
- a) Accompany it with the complete corresponding machine-readable
139
- source code, which must be distributed under the terms of Sections
140
- 1 and 2 above on a medium customarily used for software interchange; or,
141
-
142
- b) Accompany it with a written offer, valid for at least three
143
- years, to give any third party, for a charge no more than your
144
- cost of physically performing source distribution, a complete
145
- machine-readable copy of the corresponding source code, to be
146
- distributed under the terms of Sections 1 and 2 above on a medium
147
- customarily used for software interchange; or,
148
-
149
- c) Accompany it with the information you received as to the offer
150
- to distribute corresponding source code. (This alternative is
151
- allowed only for noncommercial distribution and only if you
152
- received the program in object code or executable form with such
153
- an offer, in accord with Subsection b above.)
154
-
155
- The source code for a work means the preferred form of the work for
156
- making modifications to it. For an executable work, complete source
157
- code means all the source code for all modules it contains, plus any
158
- associated interface definition files, plus the scripts used to
159
- control compilation and installation of the executable. However, as a
160
- special exception, the source code distributed need not include
161
- anything that is normally distributed (in either source or binary
162
- form) with the major components (compiler, kernel, and so on) of the
163
- operating system on which the executable runs, unless that component
164
- itself accompanies the executable.
165
-
166
- If distribution of executable or object code is made by offering
167
- access to copy from a designated place, then offering equivalent
168
- access to copy the source code from the same place counts as
169
- distribution of the source code, even though third parties are not
170
- compelled to copy the source along with the object code.
171
-
172
- 4. You may not copy, modify, sublicense, or distribute the Program
173
- except as expressly provided under this License. Any attempt
174
- otherwise to copy, modify, sublicense or distribute the Program is
175
- void, and will automatically terminate your rights under this License.
176
- However, parties who have received copies, or rights, from you under
177
- this License will not have their licenses terminated so long as such
178
- parties remain in full compliance.
179
-
180
- 5. You are not required to accept this License, since you have not
181
- signed it. However, nothing else grants you permission to modify or
182
- distribute the Program or its derivative works. These actions are
183
- prohibited by law if you do not accept this License. Therefore, by
184
- modifying or distributing the Program (or any work based on the
185
- Program), you indicate your acceptance of this License to do so, and
186
- all its terms and conditions for copying, distributing or modifying
187
- the Program or works based on it.
188
-
189
- 6. Each time you redistribute the Program (or any work based on the
190
- Program), the recipient automatically receives a license from the
191
- original licensor to copy, distribute or modify the Program subject to
192
- these terms and conditions. You may not impose any further
193
- restrictions on the recipients' exercise of the rights granted herein.
194
- You are not responsible for enforcing compliance by third parties to
195
- this License.
196
-
197
- 7. If, as a consequence of a court judgment or allegation of patent
198
- infringement or for any other reason (not limited to patent issues),
199
- conditions are imposed on you (whether by court order, agreement or
200
- otherwise) that contradict the conditions of this License, they do not
201
- excuse you from the conditions of this License. If you cannot
202
- distribute so as to satisfy simultaneously your obligations under this
203
- License and any other pertinent obligations, then as a consequence you
204
- may not distribute the Program at all. For example, if a patent
205
- license would not permit royalty-free redistribution of the Program by
206
- all those who receive copies directly or indirectly through you, then
207
- the only way you could satisfy both it and this License would be to
208
- refrain entirely from distribution of the Program.
209
-
210
- If any portion of this section is held invalid or unenforceable under
211
- any particular circumstance, the balance of the section is intended to
212
- apply and the section as a whole is intended to apply in other
213
- circumstances.
214
-
215
- It is not the purpose of this section to induce you to infringe any
216
- patents or other property right claims or to contest validity of any
217
- such claims; this section has the sole purpose of protecting the
218
- integrity of the free software distribution system, which is
219
- implemented by public license practices. Many people have made
220
- generous contributions to the wide range of software distributed
221
- through that system in reliance on consistent application of that
222
- system; it is up to the author/donor to decide if he or she is willing
223
- to distribute software through any other system and a licensee cannot
224
- impose that choice.
225
-
226
- This section is intended to make thoroughly clear what is believed to
227
- be a consequence of the rest of this License.
228
-
229
- 8. If the distribution and/or use of the Program is restricted in
230
- certain countries either by patents or by copyrighted interfaces, the
231
- original copyright holder who places the Program under this License
232
- may add an explicit geographical distribution limitation excluding
233
- those countries, so that distribution is permitted only in or among
234
- countries not thus excluded. In such case, this License incorporates
235
- the limitation as if written in the body of this License.
236
-
237
- 9. The Free Software Foundation may publish revised and/or new versions
238
- of the General Public License from time to time. Such new versions will
239
- be similar in spirit to the present version, but may differ in detail to
240
- address new problems or concerns.
241
-
242
- Each version is given a distinguishing version number. If the Program
243
- specifies a version number of this License which applies to it and "any
244
- later version", you have the option of following the terms and conditions
245
- either of that version or of any later version published by the Free
246
- Software Foundation. If the Program does not specify a version number of
247
- this License, you may choose any version ever published by the Free Software
248
- Foundation.
249
-
250
- 10. If you wish to incorporate parts of the Program into other free
251
- programs whose distribution conditions are different, write to the author
252
- to ask for permission. For software which is copyrighted by the Free
253
- Software Foundation, write to the Free Software Foundation; we sometimes
254
- make exceptions for this. Our decision will be guided by the two goals
255
- of preserving the free status of all derivatives of our free software and
256
- of promoting the sharing and reuse of software generally.
257
-
258
- NO WARRANTY
259
-
260
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
- FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262
- OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
- PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
- OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266
- TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267
- PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
- REPAIR OR CORRECTION.
269
-
270
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
- WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
- REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
- INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
- OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
- TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
- YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
- PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
- POSSIBILITY OF SUCH DAMAGES.
279
-
280
- END OF TERMS AND CONDITIONS
281
-
282
- How to Apply These Terms to Your New Programs
283
-
284
- If you develop a new program, and you want it to be of the greatest
285
- possible use to the public, the best way to achieve this is to make it
286
- free software which everyone can redistribute and change under these terms.
287
-
288
- To do so, attach the following notices to the program. It is safest
289
- to attach them to the start of each source file to most effectively
290
- convey the exclusion of warranty; and each file should have at least
291
- the "copyright" line and a pointer to where the full notice is found.
292
-
293
- {description}
294
- Copyright (C) {year} {fullname}
295
-
296
- This program is free software; you can redistribute it and/or modify
297
- it under the terms of the GNU General Public License as published by
298
- the Free Software Foundation; either version 2 of the License, or
299
- (at your option) any later version.
300
-
301
- This program is distributed in the hope that it will be useful,
302
- but WITHOUT ANY WARRANTY; without even the implied warranty of
303
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304
- GNU General Public License for more details.
305
-
306
- You should have received a copy of the GNU General Public License along
307
- with this program; if not, write to the Free Software Foundation, Inc.,
308
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309
-
310
- Also add information on how to contact you by electronic and paper mail.
311
-
312
- If the program is interactive, make it output a short notice like this
313
- when it starts in an interactive mode:
314
-
315
- Gnomovision version 69, Copyright (C) year name of author
316
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317
- This is free software, and you are welcome to redistribute it
318
- under certain conditions; type `show c' for details.
319
-
320
- The hypothetical commands `show w' and `show c' should show the appropriate
321
- parts of the General Public License. Of course, the commands you use may
322
- be called something other than `show w' and `show c'; they could even be
323
- mouse-clicks or menu items--whatever suits your program.
324
-
325
- You should also get your employer (if you work as a programmer) or your
326
- school, if any, to sign a "copyright disclaimer" for the program, if
327
- necessary. Here is a sample; alter the names:
328
-
329
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
331
-
332
- {signature of Ty Coon}, 1 April 1989
333
- Ty Coon, President of Vice
334
-
335
- This General Public License does not permit incorporating your program into
336
- proprietary programs. If your program is a subroutine library, you may
337
- consider it more useful to permit linking proprietary applications with the
338
- library. If this is what you want to do, use the GNU Lesser General
339
- Public License instead of this License.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/README.md DELETED
@@ -1,31 +0,0 @@
1
- # Enable Media Replace
2
-
3
- This plugin allows you to replace a file in your media library by uploading a new file in its place. No more deleting, renaming and re-uploading files!
4
-
5
- ## A real timesaver
6
-
7
- Don't you find it tedious and complicated to have to first delete a file and then upload one with the exact same name every time you want to update an image or any uploaded file inside the WordPress media library?
8
-
9
- Well, no longer!
10
-
11
- Now you'll be able to replace any uploaded file from the media "edit" view, where it should be. Media replacement can be done in one of two ways:
12
-
13
- ## It's simple to replace a file
14
-
15
- 1. Just replace the file. This option requires you to upload a file of the same type as the one you are replacing. The name of the attachment will stay the same no matter what the file you upload is called.
16
- 1. Replace the file, use new file name and update all links. 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 will be updated to point to the new file name.
17
-
18
- This plugin is very powerful and a must-have for any larger sites built with WordPress.
19
-
20
- ## Display file modification time
21
-
22
- There is a shortcode available which picks up the file modification date and displays it in a post or a page. The code is:
23
- `[file_modified id=XX format=XXXX]` where the "id" is required and the "format" is optional and defaults to your current WordPress settings for date and time format.
24
-
25
- So `[file_modified id=870]` would display the last time the file with ID 870 was updated on your site. To get the ID for a file, check the URL when editing a file in the media library (see screenshot #4)
26
-
27
- If you want more control over the format used to display the time, you can use the format option, so `[file_modified id=870 format=Y-m-d]` would display the file modification date but not the time. The format string uses [standard PHP date() formatting tags](http://php.net/manual/en/function.date.php).
28
-
29
- ***
30
-
31
- See [Enable Media Replace](http://wordpress.org/plugins/enable-media-replace/) at WordPress.org for more information.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/enable-media-replace.php DELETED
@@ -1,181 +0,0 @@
1
- <?php
2
- /*
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: 3.2
7
- Author: Måns Jonasson
8
- Author URI: http://www.mansjonasson.se
9
-
10
- Dual licensed under the MIT and GPL licenses:
11
- http://www.opensource.org/licenses/mit-license.php
12
- http://www.gnu.org/licenses/gpl.html
13
- */
14
-
15
- /**
16
- * Main Plugin file
17
- * Set action hooks and add shortcode
18
- *
19
- * @author Måns Jonasson <http://www.mansjonasson.se>
20
- * @copyright Måns Jonasson 13 sep 2010
21
- * @package wordpress
22
- * @subpackage enable-media-replace
23
- *
24
- */
25
-
26
- add_action('admin_init', 'enable_media_replace_init');
27
- add_action('admin_menu', 'emr_menu');
28
- add_filter('attachment_fields_to_edit', 'enable_media_replace', 10, 2);
29
- add_filter('media_row_actions', 'add_media_action', 10, 2);
30
-
31
- //add_action('admin_notices', 'emr_display_notices');
32
- add_action('wp_ajax_emr_dismiss_notices', 'emr_dismiss_notices');
33
-
34
- add_shortcode('file_modified', 'emr_get_modified_date');
35
-
36
- /**
37
- * Register this file in WordPress so we can call it with a ?page= GET var.
38
- * To suppress it in the menu we give it an empty menu title.
39
- */
40
- function emr_menu() {
41
- add_submenu_page(NULL, __("Replace media", "enable-media-replace"), '','upload_files', 'enable-media-replace/enable-media-replace', 'emr_options');
42
- }
43
-
44
- /**
45
- * Initialize this plugin. Called by 'admin_init' hook.
46
- * Only languages files needs loading during init.
47
- */
48
- function enable_media_replace_init() {
49
- load_plugin_textdomain( 'enable-media-replace', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
50
- }
51
-
52
- /**
53
- * Add some new fields to the attachment edit panel.
54
- * @param array form fields edit panel
55
- * @return array form fields with enable-media-replace fields added
56
- */
57
- function enable_media_replace( $form_fields, $post ) {
58
-
59
- $url = admin_url( "upload.php?page=enable-media-replace/enable-media-replace.php&action=media_replace&attachment_id=" . $post->ID);
60
- $action = "media_replace";
61
- $editurl = wp_nonce_url( $url, $action );
62
-
63
- if (FORCE_SSL_ADMIN) {
64
- $editurl = str_replace("http:", "https:", $editurl);
65
- }
66
- $link = "href=\"$editurl\"";
67
- $form_fields["enable-media-replace"] = array("label" => __("Replace media", "enable-media-replace"), "input" => "html", "html" => "<p><a class='button-secondary'$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"));
68
-
69
- return $form_fields;
70
- }
71
-
72
- /**
73
- * Load the replace media panel.
74
- * Panel is show on the action 'media-replace' and a given attachement.
75
- * Called by GET var ?page=enable-media-replace/enable-media-replace.php
76
- */
77
- function emr_options() {
78
-
79
- if ( isset( $_GET['action'] ) && $_GET['action'] == 'media_replace' ) {
80
- check_admin_referer( 'media_replace' ); // die if invalid or missing nonce
81
- if ( array_key_exists("attachment_id", $_GET) && (int) $_GET["attachment_id"] > 0) {
82
- include("popup.php");
83
- }
84
- }
85
-
86
- if ( isset( $_GET['action'] ) && $_GET['action'] == 'media_replace_upload' ) {
87
- $plugin_url = str_replace("enable-media-replace.php", "", __FILE__);
88
- check_admin_referer( 'media_replace_upload' ); // die if invalid or missing nonce
89
- require_once($plugin_url . "upload.php");
90
- }
91
-
92
- }
93
-
94
- /**
95
- * Function called by filter 'media_row_actions'
96
- * Enables linking to EMR straight from the media library
97
- */
98
- function add_media_action( $actions, $post) {
99
- $url = admin_url( "upload.php?page=enable-media-replace/enable-media-replace.php&action=media_replace&attachment_id=" . $post->ID);
100
- $action = "media_replace";
101
- $editurl = wp_nonce_url( $url, $action );
102
-
103
- if (FORCE_SSL_ADMIN) {
104
- $editurl = str_replace("http:", "https:", $editurl);
105
- }
106
- $link = "href=\"$editurl\"";
107
-
108
- $newaction['adddata'] = '<a ' . $link . ' aria-label="' . __("Replace media", "enable-media-replace") . '" rel="permalink">' . __("Replace media", "enable-media-replace") . '</a>';
109
- return array_merge($actions,$newaction);
110
- }
111
-
112
- /**
113
- * Shorttag function to show the media file modification date/time.
114
- * @param array shorttag attributes
115
- * @return string content / replacement shorttag
116
- */
117
- function emr_get_modified_date($atts) {
118
- $id=0;
119
- $format= '';
120
-
121
- extract(shortcode_atts(array(
122
- 'id' => '',
123
- 'format' => get_option('date_format') . " " . get_option('time_format'),
124
- ), $atts));
125
-
126
- if ($id == '') return false;
127
-
128
- // Get path to file
129
- $current_file = get_attached_file($id);
130
-
131
- if ( ! file_exists( $current_file ) ) {
132
- return false;
133
- }
134
-
135
- // Get file modification time
136
- $filetime = filemtime($current_file);
137
-
138
- if ( false !== $filetime ) {
139
- // do date conversion
140
- return date( $format, $filetime );
141
- }
142
-
143
- return false;
144
- }
145
-
146
- // Add Last replaced by EMR plugin in the media edit screen metabox - Thanks Jonas Lundman (http://wordpress.org/support/topic/add-filter-hook-suggestion-to)
147
- function ua_admin_date_replaced_media_on_edit_media_screen() {
148
- if( !function_exists( 'enable_media_replace' ) ) return;
149
- global $post;
150
- $id = $post->ID;
151
- $shortcode = "[file_modified id=$id]";
152
-
153
- $file_modified_time = do_shortcode($shortcode);
154
- if ( ! $file_modified_time ) {
155
- return;
156
- }
157
- ?>
158
- <div class="misc-pub-section curtime">
159
- <span id="timestamp"><?php _e( 'Revised', 'enable-media-replace' ); ?>: <b><?php echo $file_modified_time; ?></b></span>
160
- </div>
161
- <?php
162
- }
163
- add_action( 'attachment_submitbox_misc_actions', 'ua_admin_date_replaced_media_on_edit_media_screen', 91 );
164
-
165
- /*----------------------------------------------------------------------------------------------------------
166
- Display/dismiss admin notices if needed
167
- -----------------------------------------------------------------------------------------------------------*/
168
-
169
- function emr_display_notices() {
170
- if(!get_option( 'emr_news') && !is_plugin_active('shortpixel-image-optimiser/wp-shortpixel.php')) {
171
- $screen = get_current_screen();
172
- if($screen->id != "media_page_enable-media-replace/enable-media-replace") {
173
- require_once( str_replace("enable-media-replace.php", "notice.php", __FILE__) );
174
- }
175
- }
176
- }
177
-
178
- function emr_dismiss_notices() {
179
- update_option( 'emr_news', true);
180
- return json_encode(array("Status" => 0));
181
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/img/sp.png DELETED
Binary file
trunk/languages/enable-media-replace-da_DK.mo DELETED
Binary file
trunk/languages/enable-media-replace-da_DK.po DELETED
@@ -1,89 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: enable-media-replace\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2010-09-13 14:57+0100\n"
6
- "PO-Revision-Date: \n"
7
- "Last-Translator: Michael Bering Petersen <michaelbering@gmail.com>\n"
8
- "Language-Team: \n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-KeywordsList: __;_e\n"
13
- "X-Poedit-Basepath: .\n"
14
- "X-Poedit-SearchPath-0: .\n"
15
-
16
- #: enable-media-replace.php:40
17
- #: enable-media-replace.php:68
18
- msgid "Replace media"
19
- msgstr "Udskift media"
20
-
21
- #: enable-media-replace.php:68
22
- msgid "Upload a new file"
23
- msgstr "Upload en ny fil"
24
-
25
- #: enable-media-replace.php:68
26
- msgid "To replace the current file, click the link and upload a replacement."
27
- msgstr "Hvis du ønsker at udskifte den aktuelle fil - klik på linket og upload den nye fil."
28
-
29
- #: popup.php:14
30
- #: upload.php:21
31
- msgid "You do not have permission to upload files."
32
- msgstr "Du har ikke tilladelse til at uploade filer."
33
-
34
- #: popup.php:30
35
- msgid "Replace Media Upload"
36
- msgstr "Replace Media Upload"
37
-
38
- #: popup.php:41
39
- msgid "NOTE: You are about to replace the media file"
40
- msgstr "OBS: Du er nu ved at overskrive filen,"
41
-
42
- #: popup.php:41
43
- msgid "There is no undo. Think about it!"
44
- msgstr "Der er ingen mulighed for at fortryde, så tænkt dig godt om inden du accepterer."
45
-
46
- #: popup.php:43
47
- msgid "Choose a file to upload from your computer"
48
- msgstr "Vælg den fil du ønsker at uploade fra din computer."
49
-
50
- #: popup.php:47
51
- msgid "Select media replacement type:"
52
- msgstr "Vælg media type:"
53
-
54
- #: popup.php:49
55
- msgid "Just replace the file"
56
- msgstr "Udskift filen"
57
-
58
- #: popup.php:50
59
- msgid "Note: This option requires you to upload a file of the same type ("
60
- msgstr "OBS: Denne mulighed kræver at du uploader en fil af samme type ("
61
-
62
- #: popup.php:50
63
- msgid ") as the one you are replacing. The name of the attachment will stay the same ("
64
- msgstr ") som den du overskriver. Navnet på filen vil forblive det samme ("
65
-
66
- #: popup.php:50
67
- msgid ") no matter what the file you upload is called."
68
- msgstr ") uanset hvad den fil du uploader hedder."
69
-
70
- #: popup.php:52
71
- msgid "Replace the file, use new file name and update all links"
72
- msgstr "Overskriv filen, brug det nye fil navn og opdater alle links-"
73
-
74
- #: popup.php:53
75
- 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 ("
76
- msgstr "OBS: Hvis du vælger denne mulighed - vil filnavnet og filtypen som du er ved at uploade overskrive den gamle fil. Alle links der peger på den nuværende fil ("
77
-
78
- #: popup.php:53
79
- msgid ") will be updated to point to the new file name."
80
- msgstr ") vil blive opdateret så de peger på den nye fil."
81
-
82
- #: popup.php:55
83
- msgid "Upload"
84
- msgstr "Upload"
85
-
86
- #: popup.php:55
87
- msgid "Cancel"
88
- msgstr "Fortryd"
89
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/languages/enable-media-replace-de_DE.mo DELETED
Binary file
trunk/languages/enable-media-replace-de_DE.po DELETED
@@ -1,89 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: enable-media-replace\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2010-09-13 14:57+0100\n"
6
- "PO-Revision-Date: \n"
7
- "Last-Translator: Martin Lettner <m.lettner@gmail.com>\n"
8
- "Language-Team: \n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-KeywordsList: __;_e\n"
13
- "X-Poedit-Basepath: .\n"
14
- "X-Poedit-SearchPath-0: .\n"
15
-
16
- #: enable-media-replace.php:40
17
- #: enable-media-replace.php:68
18
- msgid "Replace media"
19
- msgstr "Datei ersetzen"
20
-
21
- #: enable-media-replace.php:68
22
- msgid "Upload a new file"
23
- msgstr "Eine neue Datei hochladen"
24
-
25
- #: enable-media-replace.php:68
26
- msgid "To replace the current file, click the link and upload a replacement."
27
- msgstr "Eine neue Datei hochladen, die die aktuelle ersetzen soll."
28
-
29
- #: popup.php:14
30
- #: upload.php:21
31
- msgid "You do not have permission to upload files."
32
- msgstr "Sie haben nicht die benötigten Rechte um Dateien hochzuladen."
33
-
34
- #: popup.php:30
35
- msgid "Replace Media Upload"
36
- msgstr "Medien-Datei ersetzen"
37
-
38
- #: popup.php:41
39
- msgid "NOTE: You are about to replace the media file"
40
- msgstr "HINWEIS: Sie sind dabei, eine Datei in der Mediathek zu ersetzen"
41
-
42
- #: popup.php:41
43
- msgid "There is no undo. Think about it!"
44
- msgstr "Diese Aktion kann nicht rückgängig gemacht werden!"
45
-
46
- #: popup.php:43
47
- msgid "Choose a file to upload from your computer"
48
- msgstr "Datei vom Computer auswählen:"
49
-
50
- #: popup.php:47
51
- msgid "Select media replacement type:"
52
- msgstr "Wählen Sie die gewünschte Aktion:"
53
-
54
- #: popup.php:49
55
- msgid "Just replace the file"
56
- msgstr "Datei einfach ersetzen"
57
-
58
- #: popup.php:50
59
- msgid "Note: This option requires you to upload a file of the same type ("
60
- msgstr "Hinweis: Die Datei muss vom selben Dateityp sein ("
61
-
62
- #: popup.php:50
63
- msgid ") as the one you are replacing. The name of the attachment will stay the same ("
64
- msgstr ") wie die Datei, die Sie ersetzen. Der Name der der Datei bleibt erhalten ("
65
-
66
- #: popup.php:50
67
- msgid ") no matter what the file you upload is called."
68
- msgstr "), ganz egal wie die neue Datei heißt."
69
-
70
- #: popup.php:52
71
- msgid "Replace the file, use new file name and update all links"
72
- msgstr "Datei ersetzen, aber neuen Dateinamen verwenden und alle Links automatisch aktualisieren"
73
-
74
- #: popup.php:53
75
- 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 ("
76
- msgstr "Hinweis: Der Name der neuen Datei wird die alte ersetzen. Alle Verweise auf die aktuelle Datei ("
77
-
78
- #: popup.php:53
79
- msgid ") will be updated to point to the new file name."
80
- msgstr ") werden auf die neue aktualisiert."
81
-
82
- #: popup.php:55
83
- msgid "Upload"
84
- msgstr "Hochladen"
85
-
86
- #: popup.php:55
87
- msgid "Cancel"
88
- msgstr "Abbrechen"
89
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/languages/enable-media-replace-fr_FR.mo DELETED
Binary file
trunk/languages/enable-media-replace-fr_FR.po DELETED
@@ -1,93 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Enable Media Replace\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2011-03-24 10:57+0100\n"
6
- "PO-Revision-Date: 2011-03-24 11:41+0100\n"
7
- "Last-Translator: François Collette <francois.collette@gmail.com>\n"
8
- "Language-Team: \n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-KeywordsList: _e;__\n"
13
- "X-Poedit-Basepath: .\n"
14
- "X-Poedit-SearchPath-0: .\n"
15
-
16
- #: enable-media-replace.php:39
17
- #: enable-media-replace.php:67
18
- msgid "Replace media"
19
- msgstr "Remplacer le média"
20
-
21
- #: enable-media-replace.php:67
22
- msgid "Upload a new file"
23
- msgstr "Choisir le nouveau fichier"
24
-
25
- #: enable-media-replace.php:67
26
- msgid "To replace the current file, click the link and upload a replacement."
27
- msgstr "Pour remplacer le fichier actuel, cliquez ci-dessus et choisissez le nouveau fichier."
28
-
29
- #: popup.php:14
30
- #: upload.php:3
31
- msgid "You do not have permission to upload files."
32
- msgstr "Vous n'avez pas la permission d'envoyer des fichiers."
33
-
34
- #: popup.php:30
35
- msgid "Replace Media Upload"
36
- msgstr "Remplacement de média"
37
-
38
- #: popup.php:46
39
- msgid "NOTE: You are about to replace the media file"
40
- msgstr "ATTENTION : vous vous apprêtez à remplacer le fichier"
41
-
42
- #: popup.php:46
43
- msgid "There is no undo. Think about it!"
44
- msgstr "Cette opération est irréversible. Soyez sûr(e) de vous !"
45
-
46
- #: popup.php:48
47
- msgid "Choose a file to upload from your computer"
48
- msgstr "Envoyez un fichier depuis votre ordinateur :"
49
-
50
- #: popup.php:52
51
- msgid "Select media replacement type:"
52
- msgstr "Choisissez la méthode de remplacement :"
53
-
54
- #: popup.php:54
55
- msgid "Just replace the file"
56
- msgstr "Remplacer le fichier seulement"
57
-
58
- #: popup.php:55
59
- msgid "Note: This option requires you to upload a file of the same type ("
60
- msgstr "Avec cette option, vous devez choisir un fichier du même type ("
61
-
62
- #: popup.php:55
63
- msgid ") as the one you are replacing. The name of the attachment will stay the same ("
64
- msgstr ") que le précédent. Le nom du fichier actuel ("
65
-
66
- #: popup.php:55
67
- msgid ") no matter what the file you upload is called."
68
- msgstr ") sera conservé, quel que soit le nom de votre nouveau fichier."
69
-
70
- #: popup.php:57
71
- msgid "Replace the file, use new file name and update all links"
72
- msgstr "Remplacer le fichier, utiliser le nouveau nom de fichier et mettre à jour tous les liens"
73
-
74
- #: popup.php:58
75
- 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 ("
76
- msgstr "Avec cette option, le nom et le type de votre nouveau fichier vont remplacer ceux du fichier actuel. Tous les liens vers celui-ci ("
77
-
78
- #: popup.php:58
79
- msgid ") will be updated to point to the new file name."
80
- msgstr ") seront mis à jour selon le nouveau nom du fichier."
81
-
82
- #: popup.php:60
83
- msgid "Upload"
84
- msgstr "Envoyer"
85
-
86
- #: popup.php:60
87
- msgid "Cancel"
88
- msgstr "Annuler"
89
-
90
- #: upload.php:35
91
- msgid "File type does not meet security guidelines. Try another."
92
- msgstr "Ce type de fichier est incompatible avec les règles de sécurité. Essayez-en un autre."
93
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/languages/enable-media-replace-it_IT.mo DELETED
Binary file
trunk/languages/enable-media-replace-it_IT.po DELETED
@@ -1,95 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Enable Media Replace\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2011-03-24 10:57+0100\n"
6
- "PO-Revision-Date: 2012-11-27 12:03+0100\n"
7
- "Last-Translator: Marco <marco@blackstudio.it>\n"
8
- "Language-Team: Black Studio <info@blackstudio.it>\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-KeywordsList: _e;__\n"
13
- "X-Poedit-Basepath: .\n"
14
- "X-Poedit-Language: Italian\n"
15
- "X-Poedit-Country: ITALY\n"
16
- "X-Poedit-SearchPath-0: .\n"
17
-
18
- #: enable-media-replace.php:39
19
- #: enable-media-replace.php:67
20
- msgid "Replace media"
21
- msgstr "Sostituisci file"
22
-
23
- #: enable-media-replace.php:67
24
- msgid "Upload a new file"
25
- msgstr "Carica un nuovo file"
26
-
27
- #: enable-media-replace.php:67
28
- msgid "To replace the current file, click the link and upload a replacement."
29
- msgstr "Per sostituire il file corrente, clicca il link e carica un file sostitutivo."
30
-
31
- #: popup.php:14
32
- #: upload.php:3
33
- msgid "You do not have permission to upload files."
34
- msgstr "Non hai sufficienti permessi per caricare file."
35
-
36
- #: popup.php:30
37
- msgid "Replace Media Upload"
38
- msgstr "Caricamento file sostitutivo"
39
-
40
- #: popup.php:46
41
- msgid "NOTE: You are about to replace the media file"
42
- msgstr "NOTA: Stai per sostituire il file"
43
-
44
- #: popup.php:46
45
- msgid "There is no undo. Think about it!"
46
- msgstr "Questa operazione non è reversibile. Fai attenzione!"
47
-
48
- #: popup.php:48
49
- msgid "Choose a file to upload from your computer"
50
- msgstr "Seleziona un file da caricare dal tuo computer"
51
-
52
- #: popup.php:52
53
- msgid "Select media replacement type:"
54
- msgstr "Seleziona il tipo di sostituzione:"
55
-
56
- #: popup.php:54
57
- msgid "Just replace the file"
58
- msgstr "Sostituire semplicemente il file"
59
-
60
- #: popup.php:55
61
- msgid "Note: This option requires you to upload a file of the same type ("
62
- msgstr "Nota: Questa opzione richiede il caricamento di un file dello stesso tipo ("
63
-
64
- #: popup.php:55
65
- msgid ") as the one you are replacing. The name of the attachment will stay the same ("
66
- msgstr ") di quello sostituito. Il nome dell'allegato rimarrà invariato ("
67
-
68
- #: popup.php:55
69
- msgid ") no matter what the file you upload is called."
70
- msgstr ") indipendentemente dal nome del file caricato."
71
-
72
- #: popup.php:57
73
- msgid "Replace the file, use new file name and update all links"
74
- msgstr "Sostituire il file, usare il nome del nuovo file ed aggiornare tutti i collegamenti"
75
-
76
- #: popup.php:58
77
- 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 ("
78
- msgstr "Nota: Se selezioni questa opzione, il nome ed il tipo di file che stai per caricare sostituiranno quelli del file precedente. Tutti i collegamenti che puntavano al file precedente ("
79
-
80
- #: popup.php:58
81
- msgid ") will be updated to point to the new file name."
82
- msgstr ") saranno aggiornati per puntare al nuovo file."
83
-
84
- #: popup.php:60
85
- msgid "Upload"
86
- msgstr "Carica"
87
-
88
- #: popup.php:60
89
- msgid "Cancel"
90
- msgstr "Annulla"
91
-
92
- #: upload.php:35
93
- msgid "File type does not meet security guidelines. Try another."
94
- msgstr "Il tipo di file non rispetta le restrizioni di sicurezza. Riprova con un altro tipo."
95
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/languages/enable-media-replace-ja.mo DELETED
Binary file
trunk/languages/enable-media-replace-ja.po DELETED
@@ -1,114 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: enable-media-replace\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2015-01-19 09:00+0900\n"
6
- "PO-Revision-Date: \n"
7
- "Last-Translator: chacomv\n"
8
- "Language-Team: \n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-KeywordsList: __;_e\n"
13
- "X-Poedit-Basepath: .\n"
14
- "X-Generator: Poedit 1.5.7\n"
15
- "X-Poedit-SearchPath-0: .\n"
16
-
17
- #: enable-media-replace.php:40 enable-media-replace.php:79
18
- #: enable-media-replace.php:120
19
- msgid "Replace media"
20
- msgstr "メディアを置換"
21
-
22
- #: enable-media-replace.php:79
23
- msgid "Upload a new file"
24
- msgstr "新しいファイルをアップロード"
25
-
26
- #: enable-media-replace.php:79
27
- msgid "To replace the current file, click the link and upload a replacement."
28
- msgstr ""
29
- "現在のファイルを置換するには、このリンクをクリックしてアップロードします。"
30
-
31
- #: enable-media-replace.php:168
32
- msgid "Revised"
33
- msgstr "変更されました"
34
-
35
- #: popup.php:14 upload.php:3
36
- msgid "You do not have permission to upload files."
37
- msgstr "ファイルをアップロードする権限がありません。"
38
-
39
- #: popup.php:30
40
- msgid "Replace Media Upload"
41
- msgstr "新しいメディアファイルをアップロード"
42
-
43
- #: popup.php:46
44
- msgid "NOTE: You are about to replace the media file"
45
- msgstr "※ このメディアを置き換えようとしています。"
46
-
47
- #: popup.php:46
48
- msgid "There is no undo. Think about it!"
49
- msgstr "元に戻せませんのでご注意ください。"
50
-
51
- #: popup.php:48
52
- msgid "Choose a file to upload from your computer"
53
- msgstr "コンピューターからアップロードするファイルを選択"
54
-
55
- #: popup.php:52
56
- msgid "Select media replacement type:"
57
- msgstr "メディアを置換する方式を選択:"
58
-
59
- #: popup.php:54
60
- msgid "Just replace the file"
61
- msgstr "ファイルの置換のみ"
62
-
63
- #: popup.php:55
64
- msgid "Note: This option requires you to upload a file of the same type ("
65
- msgstr ""
66
- "※ このオプションは、元のファイルと同じファイル形式でアップロードする必要があ"
67
- "ります。("
68
-
69
- #: popup.php:55
70
- msgid ""
71
- ") as the one you are replacing. The name of the attachment will stay the "
72
- "same ("
73
- msgstr ") ファイル名は同じになります。("
74
-
75
- #: popup.php:55
76
- msgid ") no matter what the file you upload is called."
77
- msgstr ")"
78
-
79
- #: popup.php:57
80
- msgid "Replace the file, use new file name and update all links"
81
- msgstr "ファイルを置換して新しいファイル名で全てのリンクを更新する"
82
-
83
- #: popup.php:58
84
- msgid ""
85
- "Note: If you check this option, the name and type of the file you are about "
86
- "to upload will replace the old file. All links pointing to the current file ("
87
- msgstr ""
88
- "※ このオプションをチェックすると、アップロードしたファイルの名称と形式に置換"
89
- "されます。現在のファイル名("
90
-
91
- #: popup.php:58
92
- msgid ") will be updated to point to the new file name."
93
- msgstr ")へのリンクが全て新しいファイル名に更新されます。"
94
-
95
- #: popup.php:60
96
- msgid "Upload"
97
- msgstr "アップロード"
98
-
99
- #: popup.php:60
100
- msgid "Cancel"
101
- msgstr "キャンセル"
102
-
103
- #: upload.php:33
104
- msgid "File type does not meet security guidelines. Try another."
105
- msgstr ""
106
- "ファイル形式がセキュリティ的に許可されません。他の形式をお試しください。"
107
-
108
- #: popup.php:63
109
- msgid ""
110
- "Please note that if you upload a new image, only embeds/links of the "
111
- "original size image will be replaced in your posts."
112
- msgstr ""
113
- "新しいファイルをアップロードすると、元のサイズの画像へのリンクや埋め込みのみ"
114
- "が置換されますのでご注意ください。"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/languages/enable-media-replace-nl_NL.mo DELETED
Binary file
trunk/languages/enable-media-replace-nl_NL.po DELETED
@@ -1,89 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: enable-media-replace\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2010-09-10 20:53+0100\n"
6
- "PO-Revision-Date: \n"
7
- "Last-Translator: WarmStal D!sign | Ben ter Stal <mail@warmstal.nl>\n"
8
- "Language-Team: \n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-KeywordsList: __;_e\n"
13
- "X-Poedit-Basepath: .\n"
14
- "X-Poedit-SearchPath-0: .\n"
15
-
16
- #: enable-media-replace.php:26
17
- #: enable-media-replace.php:45
18
- msgid "Replace media"
19
- msgstr "Vervangen media"
20
-
21
- #: enable-media-replace.php:45
22
- msgid "Upload a new file"
23
- msgstr "Uploaden nieuw bestand"
24
-
25
- #: enable-media-replace.php:45
26
- msgid "To replace the current file, click the link and upload a replacement."
27
- msgstr "Klik om het bestaande bestand te vervangen door een nieuw te uploaden bestand."
28
-
29
- #: popup.php:7
30
- #: upload.php:10
31
- msgid "You do not have permission to upload files."
32
- msgstr "U heeft geen rechten om bestanden te uplaoden"
33
-
34
- #: popup.php:23
35
- msgid "Replace Media Upload"
36
- msgstr "Replace Media Upload"
37
-
38
- #: popup.php:34
39
- msgid "NOTE: You are about to replace the media file"
40
- msgstr "Opmerking: U staat op het punt het media bestand"
41
-
42
- #: popup.php:34
43
- msgid "There is no undo. Think about it!"
44
- msgstr "Deze bewerking kan niet ongedaan worden gemaakt!"
45
-
46
- #: popup.php:36
47
- msgid "Choose a file to upload from your computer"
48
- msgstr "Selecteer een bestand op de PC om te uploaden"
49
-
50
- #: popup.php:40
51
- msgid "Select media replacement type:"
52
- msgstr "Selecteer de wijze van vervanging"
53
-
54
- #: popup.php:42
55
- msgid "Just replace the file"
56
- msgstr "Vervang alleen het bestand"
57
-
58
- #: popup.php:43
59
- msgid "Note: This option requires you to upload a file of the same type ("
60
- msgstr "Opmerking: voor deze optie moet u een bestand van hetzelfde type uploaden ("
61
-
62
- #: popup.php:43
63
- msgid ") as the one you are replacing. The name of the attachment will stay the same ("
64
- msgstr ") De naam in de media bibliotheek blijft hetzelfde ("
65
-
66
- #: popup.php:43
67
- msgid ") no matter what the file you upload is called."
68
- msgstr ") onafhankelijk van de naam van het nieuwe bestand."
69
-
70
- #: popup.php:45
71
- msgid "Replace the file, use new file name and update all links"
72
- msgstr "Vervang het bestand, gebruik de nieuwe naam en werk alle links bij."
73
-
74
- #: popup.php:46
75
- 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 ("
76
- msgstr "Opmerking: bij deze keuze wordt het bestand volledig vervangen. Alle links naar het huidige bestand ("
77
-
78
- #: popup.php:46
79
- msgid ") will be updated to point to the new file name."
80
- msgstr ") worden bijgewerkt naar het nieuwe bestand."
81
-
82
- #: popup.php:48
83
- msgid "Upload"
84
- msgstr "Uploaden"
85
-
86
- #: popup.php:48
87
- msgid "Cancel"
88
- msgstr "Annuleren"
89
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/languages/enable-media-replace-pt_BR.mo DELETED
Binary file
trunk/languages/enable-media-replace-pt_BR.po DELETED
@@ -1,98 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: enable-media-replace\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2010-09-13 14:57+0100\n"
6
- "PO-Revision-Date: \n"
7
- "Last-Translator: Roger <rogerhnn@hotmail.com>\n"
8
- "Language-Team: Roger Nobrega <rogerhnn@hotmail.com>\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-KeywordsList: __;_e\n"
13
- "X-Poedit-Basepath: .\n"
14
- "X-Generator: Poedit 1.5.4\n"
15
- "Language: Português - Brasil\n"
16
- "X-Poedit-SourceCharset: UTF-8\n"
17
- "X-Poedit-SearchPath-0: .\n"
18
-
19
- #: enable-media-replace.php:40 enable-media-replace.php:68
20
- msgid "Replace media"
21
- msgstr "Substituir mídia"
22
-
23
- #: enable-media-replace.php:68
24
- msgid "Upload a new file"
25
- msgstr "Enviar novo arquivo"
26
-
27
- #: enable-media-replace.php:68
28
- msgid "To replace the current file, click the link and upload a replacement."
29
- msgstr ""
30
- "Para subtituir o arquivo atual, clique no link e carregue um substituto"
31
-
32
- #: popup.php:14 upload.php:21
33
- msgid "You do not have permission to upload files."
34
- msgstr "Você não tem permissões para enviar arquivos."
35
-
36
- #: popup.php:30
37
- msgid "Replace Media Upload"
38
- msgstr "Enviar Mídia Substituta"
39
-
40
- #: popup.php:41
41
- msgid "NOTE: You are about to replace the media file"
42
- msgstr "NOTA: Você irá substituir o arquivo de mídia"
43
-
44
- #: popup.php:41
45
- msgid "There is no undo. Think about it!"
46
- msgstr "Não é possível cancelar esta ação."
47
-
48
- #: popup.php:43
49
- msgid "Choose a file to upload from your computer"
50
- msgstr "Escolha um arquivo para enviar do seu computador"
51
-
52
- #: popup.php:47
53
- msgid "Select media replacement type:"
54
- msgstr "Selecione o tipo de substituição"
55
-
56
- #: popup.php:49
57
- msgid "Just replace the file"
58
- msgstr "Apenas substituir arquivo"
59
-
60
- #: popup.php:50
61
- msgid "Note: This option requires you to upload a file of the same type ("
62
- msgstr "Nota: Esta opção requer o carregamento de um arquivo do mesmo tipo ("
63
-
64
- #: popup.php:50
65
- msgid ""
66
- ") as the one you are replacing. The name of the attachment will stay the "
67
- "same ("
68
- msgstr ""
69
- ") do que está sendo substituído. O nome do arquivo permanecerá o mesmo("
70
-
71
- #: popup.php:50
72
- msgid ") no matter what the file you upload is called."
73
- msgstr "), independente do nome do arquivo enviado."
74
-
75
- #: popup.php:52
76
- msgid "Replace the file, use new file name and update all links"
77
- msgstr ""
78
- "Substituir o arquivo, usar o novo nome de arquivo, e atualizar todos os links"
79
-
80
- #: popup.php:53
81
- msgid ""
82
- "Note: If you check this option, the name and type of the file you are about "
83
- "to upload will replace the old file. All links pointing to the current file ("
84
- msgstr ""
85
- "Nota: Se selecionar esta opção, o nome e tipo do arquivo que você enviar irá "
86
- "substituir os do arquivo antigo. Todos os links do arquivo atual ("
87
-
88
- #: popup.php:53
89
- msgid ") will be updated to point to the new file name."
90
- msgstr ") serão atualizados para o novo arquivo."
91
-
92
- #: popup.php:55
93
- msgid "Upload"
94
- msgstr "Enviar"
95
-
96
- #: popup.php:55
97
- msgid "Cancel"
98
- msgstr "Cancelar"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/languages/enable-media-replace-pt_PT.mo DELETED
Binary file
trunk/languages/enable-media-replace-pt_PT.po DELETED
@@ -1,151 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: enable-media-replace\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2017-02-10 08:48+0000\n"
6
- "PO-Revision-Date: \n"
7
- "Last-Translator: Pedro Mendonça <ped.gaspar@gmail.com>\n"
8
- "Language-Team: Pedro Mendonça <ped.gaspar@gmail.com>\n"
9
- "Language: pt_PT\n"
10
- "MIME-Version: 1.0\n"
11
- "Content-Type: text/plain; charset=UTF-8\n"
12
- "Content-Transfer-Encoding: 8bit\n"
13
- "X-Poedit-KeywordsList: __;_e\n"
14
- "X-Poedit-Basepath: ..\n"
15
- "X-Generator: Poedit 1.8.11\n"
16
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
- "X-Poedit-SourceCharset: UTF-8\n"
18
- "X-Poedit-WPHeader: enable-media-replace.php\n"
19
- "X-Poedit-SearchPath-0: .\n"
20
-
21
- #: enable-media-replace.php:38 enable-media-replace.php:64
22
- #: enable-media-replace.php:105
23
- msgid "Replace media"
24
- msgstr "Substituir multimédia"
25
-
26
- #: enable-media-replace.php:64
27
- msgid "Upload a new file"
28
- msgstr "Carregar novo ficheiro"
29
-
30
- #: enable-media-replace.php:64
31
- msgid "To replace the current file, click the link and upload a replacement."
32
- msgstr ""
33
- "Para subtituir o ficheiro actual, clique na ligação e carregue um substituto."
34
-
35
- #: enable-media-replace.php:156
36
- msgid "Revised"
37
- msgstr "Revisto"
38
-
39
- #: popup.php:14 upload.php:3
40
- msgid "You do not have permission to upload files."
41
- msgstr "Não tem permissão para carregar ficheiros."
42
-
43
- #: popup.php:29
44
- msgid "Replace Media Upload"
45
- msgstr "Carregar multimédia de substituição"
46
-
47
- #: popup.php:45
48
- #, php-format
49
- msgid ""
50
- "NOTE: You are about to replace the media file \"%s\". There is no undo. "
51
- "Think about it!"
52
- msgstr ""
53
- "NOTA: Está prestes a substituir o ficheiro multimédia \"%s\". Não será "
54
- "possível voltar a trás!"
55
-
56
- #: popup.php:47
57
- msgid "Choose a file to upload from your computer"
58
- msgstr "Escolher um ficheiro para carregar a partir do computador"
59
-
60
- #: popup.php:54
61
- msgid "Select media replacement type:"
62
- msgstr "Seleccione o tipo de substituição de multimédia:"
63
-
64
- #: popup.php:56
65
- msgid "Just replace the file"
66
- msgstr "Apenas substituir o ficheiro"
67
-
68
- #: popup.php:57
69
- #, php-format
70
- msgid ""
71
- "Note: This option requires you to upload a file of the same type (%s) as the "
72
- "one you are replacing. The name of the attachment will stay the same (%s) no "
73
- "matter what the file you upload is called."
74
- msgstr ""
75
- "Nota: Esta opção requer o carregamento de um ficheiro do mesmo tipo (%s) "
76
- "daquele a substituir. O nome do ficheiro permanecerá o mesmo (%s), "
77
- "independentemente do nome do ficheiro carregado."
78
-
79
- #: popup.php:60
80
- msgid "Replace the file, use new file name and update all links"
81
- msgstr ""
82
- "Substituir o ficheiro, usar o novo nome de ficheiro e actualizar todas as "
83
- "ligações"
84
-
85
- #: popup.php:61
86
- #, php-format
87
- msgid ""
88
- "Note: If you check this option, the name and type of the file you are about "
89
- "to upload will replace the old file. All links pointing to the current file "
90
- "(%s) will be updated to point to the new file name."
91
- msgstr ""
92
- "Nota: Se seleccionar esta opção, o nome e tipo do ficheiro que está prestes "
93
- "a carregar irá substituir os do ficheiro antigo. Todas as ligações que "
94
- "referenciam o ficheiro actual (%s) serão actualizadas de modo a referenciar "
95
- "o novo nome de ficheiro."
96
-
97
- #: popup.php:62
98
- msgid ""
99
- "Please note that if you upload a new image, only embeds/links of the "
100
- "original size image will be replaced in your posts."
101
- msgstr ""
102
- "Por favor tenha em atenção que se carregar uma nova imagem, apenas as "
103
- "imagens incorporadas e ligações com o tamanho original serão substituídas "
104
- "nos seus artigos."
105
-
106
- #: popup.php:67
107
- msgid "Upload"
108
- msgstr "Carregar"
109
-
110
- #: popup.php:67
111
- msgid "Cancel"
112
- msgstr "Cancelar"
113
-
114
- #: upload.php:26
115
- #, php-format
116
- msgid ""
117
- "The file %1$s can not be deleted by the web server, most likely because the "
118
- "permissions on the file are wrong."
119
- msgstr ""
120
- "O ficheiro %1$s não pode ser apagado pelo servidor web, provavelmente porque "
121
- "as permissões do ficheiro estão incorrectas."
122
-
123
- #: upload.php:84
124
- msgid "File type does not meet security guidelines. Try another."
125
- msgstr ""
126
- "O tipo de ficheiro não está de acordo com os padrões de segurança. Tente "
127
- "outro."
128
-
129
- #. Plugin Name of the plugin/theme
130
- msgid "Enable Media Replace"
131
- msgstr "Enable Media Replace"
132
-
133
- #. Plugin URI of the plugin/theme
134
- msgid "http://www.mansjonasson.se/enable-media-replace"
135
- msgstr "http://www.mansjonasson.se/enable-media-replace"
136
-
137
- #. Description of the plugin/theme
138
- msgid ""
139
- "Enable replacing media files by uploading a new file in the \"Edit Media\" "
140
- "section of the WordPress Media Library."
141
- msgstr ""
142
- "Permite substituir ficheiros multimédia através de carregar um novo ficheiro "
143
- "na secção \"Editar multimédia\" da biblioteca multimédia do WordPress."
144
-
145
- #. Author of the plugin/theme
146
- msgid "Måns Jonasson"
147
- msgstr "Måns Jonasson"
148
-
149
- #. Author URI of the plugin/theme
150
- msgid "http://www.mansjonasson.se"
151
- msgstr "http://www.mansjonasson.se"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/languages/enable-media-replace-ru_RU.mo DELETED
Binary file
trunk/languages/enable-media-replace-ru_RU.po DELETED
@@ -1,95 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: enable-media-replace\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2010-09-13 14:57+0100\n"
6
- "PO-Revision-Date: 2013-01-18 14:58+0400\n"
7
- "Last-Translator: Vladislav (me@dsigh.ru)\n"
8
- "Language-Team: DigitalSigh\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-KeywordsList: __;_e\n"
13
- "X-Poedit-Basepath: .\n"
14
- "X-Poedit-Language: Russian\n"
15
- "X-Poedit-Country: RUSSIAN FEDERATION\n"
16
- "X-Poedit-SourceCharset: utf-8\n"
17
- "X-Poedit-SearchPath-0: .\n"
18
- "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11) ? 0 : ((n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20)) ? 1 : 2)\n"
19
-
20
- #: enable-media-replace.php:40
21
- #: enable-media-replace.php:68
22
- msgid "Replace media"
23
- msgstr "Заменить"
24
-
25
- #: enable-media-replace.php:68
26
- msgid "Upload a new file"
27
- msgstr "Загрузить новый файл"
28
-
29
- #: enable-media-replace.php:68
30
- msgid "To replace the current file, click the link and upload a replacement."
31
- msgstr "Для того, чтобы заменить текущий файл, нажмите на ссылку и загрузите замену."
32
-
33
- #: popup.php:14
34
- #: upload.php:21
35
- msgid "You do not have permission to upload files."
36
- msgstr "У вас нет прав для загрузки файлов."
37
-
38
- #: popup.php:30
39
- msgid "Replace Media Upload"
40
- msgstr "Загрузка файла для замены"
41
-
42
- #: popup.php:41
43
- msgid "NOTE: You are about to replace the media file"
44
- msgstr "ПРИМЕЧАНИЕ: Вы собираетесь заменить медиафайл"
45
-
46
- #: popup.php:41
47
- msgid "There is no undo. Think about it!"
48
- msgstr "Данную операцию нельзя отменить. Учтите это!"
49
-
50
- #: popup.php:43
51
- msgid "Choose a file to upload from your computer"
52
- msgstr "Выберите файл для загрузки с вашего компьютера:"
53
-
54
- #: popup.php:47
55
- msgid "Select media replacement type:"
56
- msgstr "Выберите тип замены:"
57
-
58
- #: popup.php:49
59
- msgid "Just replace the file"
60
- msgstr "Только заменить файл"
61
-
62
- #: popup.php:50
63
- msgid "Note: This option requires you to upload a file of the same type ("
64
- msgstr "Этот вариант требуется, если нужно загрузить файл того же типа ("
65
-
66
- #: popup.php:50
67
- msgid ") as the one you are replacing. The name of the attachment will stay the same ("
68
- msgstr "), как оригинальный. Имя вложения останется тем же ("
69
-
70
- #: popup.php:50
71
- msgid ") no matter what the file you upload is called."
72
- msgstr ") не зависимо от того, как называется загружаемый файл."
73
-
74
- #: popup.php:52
75
- msgid "Replace the file, use new file name and update all links"
76
- msgstr "Заменить файл, использовать новое имя и обновить все ссылки"
77
-
78
- #: popup.php:53
79
- 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 ("
80
- msgstr "Если выбрать этот вариант, то имя и тип файла, который вы собираетесь загрузить, заменят старые. Все ссылки, указывающие на текущий файл ("
81
-
82
- #: popup.php:53
83
- msgid ") will be updated to point to the new file name."
84
- msgstr ") будут обновлены новыми."
85
-
86
- #: popup.php:55
87
- msgid "Upload"
88
- msgstr "Загрузить"
89
-
90
- #: popup.php:55
91
- msgid "Cancel"
92
- msgstr "Отмена"
93
-
94
- #~ msgid "Replace media upload"
95
- #~ msgstr "Загрузка файла для замены"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/languages/enable-media-replace-sv_SE.mo DELETED
Binary file
trunk/languages/enable-media-replace-sv_SE.po DELETED
@@ -1,149 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: enable-media-replace\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2015-01-16 15:55+0100\n"
6
- "PO-Revision-Date: \n"
7
- "Last-Translator: Måns Jonasson <mans@thejonassons.com>\n"
8
- "Language-Team: \n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-KeywordsList: __;_e\n"
13
- "X-Poedit-Basepath: .\n"
14
- "X-Generator: Poedit 1.5.5\n"
15
- "X-Poedit-SearchPath-0: ..\n"
16
-
17
- #: ../enable-media-replace.php:40 ../enable-media-replace.php:79
18
- #: ../enable-media-replace.php:120
19
- msgid "Replace media"
20
- msgstr "Ersätt media"
21
-
22
- #: ../enable-media-replace.php:79
23
- msgid "Upload a new file"
24
- msgstr "Ladda upp en ny fil"
25
-
26
- #: ../enable-media-replace.php:79
27
- msgid "To replace the current file, click the link and upload a replacement."
28
- msgstr ""
29
- "För att ersätta den nuvarande filen, klicka på länken och ladda upp en ny "
30
- "fil."
31
-
32
- #: ../enable-media-replace.php:161
33
- msgid "Revised"
34
- msgstr "Uppdaterad"
35
-
36
- #: ../popup.php:14 ../upload.php:3
37
- msgid "You do not have permission to upload files."
38
- msgstr "Du har inte tillåtelse att ladda upp filer."
39
-
40
- #: ../popup.php:30
41
- msgid "Replace Media Upload"
42
- msgstr "Ladda upp ny fil"
43
-
44
- #: ../popup.php:46
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:46
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:48
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:55
57
- msgid "Select media replacement type:"
58
- msgstr "Välj ersättningsform:"
59
-
60
- #: ../popup.php:57
61
- msgid "Just replace the file"
62
- msgstr "Ersätt bara filen"
63
-
64
- #: ../popup.php:58
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:58
69
- msgid ""
70
- ") as the one you are replacing. The name of the attachment will stay the "
71
- "same ("
72
- msgstr ") som den du ersätter. Namnet på filen kommer att behållas ("
73
-
74
- #: ../popup.php:58
75
- msgid ") no matter what the file you upload is called."
76
- msgstr ") oavsett vad filen du laddar upp heter på din dator."
77
-
78
- #: ../popup.php:61
79
- msgid "Replace the file, use new file name and update all links"
80
- msgstr "Ersätt filen, använd det nya filnamnet och uppdatera alla länkar"
81
-
82
- #: ../popup.php:62
83
- msgid ""
84
- "Note: If you check this option, the name and type of the file you are about "
85
- "to upload will replace the old file. All links pointing to the current file ("
86
- msgstr ""
87
- "Om du klickar i den här rutan kommer den även namnet och typen på den nya "
88
- "filen du laddar upp helt att ersätta den gamla. Alla länkar som pekar på den "
89
- "gamla filen ("
90
-
91
- #: ../popup.php:62
92
- msgid ") will be updated to point to the new file name."
93
- msgstr ") kommer att uppdateras så att de pekar på det nya filnamnet."
94
-
95
- #: ../popup.php:63
96
- msgid ""
97
- "Please note that if you upload a new image, only embeds/links of the "
98
- "original size image will be replaced in your posts."
99
- msgstr ""
100
- "Notera att om du laddar upp en ny bild kommer endast inbäddningar/länkar "
101
- "till originalstorleken att bytas ut i dina poster."
102
-
103
- #: ../popup.php:68
104
- msgid "Upload"
105
- msgstr "Ladda upp"
106
-
107
- #: ../popup.php:68
108
- msgid "Cancel"
109
- msgstr "Avbryt"
110
-
111
- #: ../upload.php:26
112
- #, php-format
113
- msgid ""
114
- "The file %1$s can not be deleted by the web server, most likely because the "
115
- "permissions on the file are wrong."
116
- msgstr ""
117
- "Filen %1$s kan inte raderas av webbservern, troligen på grund av "
118
- "filrättigheterna."
119
-
120
- #: ../upload.php:84
121
- msgid "File type does not meet security guidelines. Try another."
122
- msgstr ""
123
- "Den här filen är inte tillåten enligt WordPress säkerhetsinställningar. "
124
-
125
- #~ msgid "Enable Media Replace"
126
- #~ msgstr "Ladda upp ny fil"
127
-
128
- #~ msgid ""
129
- #~ "This plugin allows you to replace any uploaded media file by uploading a "
130
- #~ "new one."
131
- #~ msgstr ""
132
- #~ "Detta plugin låter dig ersätta en fil i mediebiblioteket genom att ladda "
133
- #~ "upp en ny."
134
-
135
- #~ msgid "First, locate the uploaded file you want to replace, using the"
136
- #~ msgstr "Hitta först den fil du vill ersätta genom att bläddra i "
137
-
138
- #~ msgid "media library browser"
139
- #~ msgstr "mediebiblioteket"
140
-
141
- #~ msgid "Click the \"Edit\" link"
142
- #~ msgstr "Tryck på \"Redigera\"-länken"
143
-
144
- #~ msgid ""
145
- #~ "Second, click the link \"Upload a new file\" and follow the instructions."
146
- #~ msgstr "Tryck sen på länken \"Ladda upp ny fil\" och följ instruktionerna."
147
-
148
- #~ msgid "Replace media upload"
149
- #~ msgstr "Ladda upp ny fil"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/languages/enable-media-replace-zh_CN.mo DELETED
Binary file
trunk/languages/enable-media-replace-zh_CN.po DELETED
@@ -1,119 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Enable Media Replace v2.6\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: \n"
6
- "PO-Revision-Date: 2012-09-18 07:29:17+0000\n"
7
- "Last-Translator: Tunghsiao Liu <info@sparanoid.com>\n"
8
- "Language-Team: \n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
- "X-Poedit-Language: Chinese\n"
14
- "X-Poedit-Country: PEOPLE'S REPUBLIC OF CHINA\n"
15
- "X-Poedit-SourceCharset: utf-8\n"
16
- "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
17
- "X-Poedit-Basepath: \n"
18
- "X-Poedit-Bookmarks: \n"
19
- "X-Poedit-SearchPath-0: .\n"
20
- "X-Textdomain-Support: yes"
21
-
22
- #: enable-media-replace.php:39
23
- #: enable-media-replace.php:67
24
- #@ enable-media-replace
25
- msgid "Replace media"
26
- msgstr "替换媒体"
27
-
28
- #: enable-media-replace.php:67
29
- #@ enable-media-replace
30
- msgid "Upload a new file"
31
- msgstr "上传新文件"
32
-
33
- #: enable-media-replace.php:67
34
- #@ enable-media-replace
35
- msgid "To replace the current file, click the link and upload a replacement."
36
- msgstr "想要替换当前文件,点击上述链接并上传新文件"
37
-
38
- #: popup.php:14
39
- #: upload.php:3
40
- #@ enable-media-replace
41
- #@ default
42
- msgid "You do not have permission to upload files."
43
- msgstr "您没有权限上传文件"
44
-
45
- #: popup.php:30
46
- #@ enable-media-replace
47
- msgid "Replace Media Upload"
48
- msgstr "替换媒体文件"
49
-
50
- #: popup.php:46
51
- #@ enable-media-replace
52
- msgid "NOTE: You are about to replace the media file"
53
- msgstr "注意:您将要替换媒体文件"
54
-
55
- #: popup.php:46
56
- #@ enable-media-replace
57
- msgid "There is no undo. Think about it!"
58
- msgstr "此操作无法撤销。"
59
-
60
- #: popup.php:48
61
- #@ enable-media-replace
62
- msgid "Choose a file to upload from your computer"
63
- msgstr "从计算机中选择文件上传"
64
-
65
- #: popup.php:52
66
- #@ enable-media-replace
67
- msgid "Select media replacement type:"
68
- msgstr "选择媒体替换类型"
69
-
70
- #: popup.php:54
71
- #@ enable-media-replace
72
- msgid "Just replace the file"
73
- msgstr "仅替换文件"
74
-
75
- #: popup.php:55
76
- #@ enable-media-replace
77
- msgid "Note: This option requires you to upload a file of the same type ("
78
- msgstr "说明:此选项要求您上传与之前文件相同的文件类型("
79
-
80
- #: popup.php:55
81
- #@ enable-media-replace
82
- msgid ") as the one you are replacing. The name of the attachment will stay the same ("
83
- msgstr "),替换后,无论您上传的文件名是什么,上传后的媒体文件名称与地址都会保持不变("
84
-
85
- #: popup.php:55
86
- #@ enable-media-replace
87
- msgid ") no matter what the file you upload is called."
88
- msgstr ")。"
89
-
90
- #: popup.php:57
91
- #@ enable-media-replace
92
- msgid "Replace the file, use new file name and update all links"
93
- msgstr "替换文件,使用新文件名并更新所有链接"
94
-
95
- #: popup.php:58
96
- #@ enable-media-replace
97
- 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 ("
98
- msgstr "说明:使用此选项,将会使用新文件的文件名及文件类型,所有包含文件名("
99
-
100
- #: popup.php:58
101
- #@ enable-media-replace
102
- msgid ") will be updated to point to the new file name."
103
- msgstr ")的链接也将会被替换成新文件名。"
104
-
105
- #: popup.php:60
106
- #@ enable-media-replace
107
- msgid "Upload"
108
- msgstr "上传"
109
-
110
- #: popup.php:60
111
- #@ enable-media-replace
112
- msgid "Cancel"
113
- msgstr "取消"
114
-
115
- #: upload.php:33
116
- #@ default
117
- msgid "File type does not meet security guidelines. Try another."
118
- msgstr "文件类型不符合安全规范,请尝试其他文件。"
119
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/languages/enable-media-replace.mo DELETED
Binary file
trunk/languages/enable-media-replace.po DELETED
@@ -1,117 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: enable-media-replace\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2015-01-16 17:42-0000\n"
6
- "PO-Revision-Date: \n"
7
- "Last-Translator: Pedro Mendonça <ped.gaspar@gmail.com>\n"
8
- "Language-Team: \n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-KeywordsList: __;_e\n"
13
- "X-Poedit-Basepath: .\n"
14
- "X-Generator: Poedit 1.7.1\n"
15
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
- "X-Poedit-SourceCharset: UTF-8\n"
17
- "Language: en\n"
18
- "X-Poedit-SearchPath-0: .\n"
19
- "X-Poedit-SearchPath-1: ..\n"
20
-
21
- #: ../enable-media-replace.php:40 ../enable-media-replace.php:79
22
- #: ../enable-media-replace.php:120
23
- msgid "Replace media"
24
- msgstr ""
25
-
26
- #: ../enable-media-replace.php:79
27
- msgid "Upload a new file"
28
- msgstr ""
29
-
30
- #: ../enable-media-replace.php:79
31
- msgid "To replace the current file, click the link and upload a replacement."
32
- msgstr ""
33
-
34
- #: ../enable-media-replace.php:161
35
- msgid "Revised"
36
- msgstr ""
37
-
38
- #: ../popup.php:14 ../upload.php:3
39
- msgid "You do not have permission to upload files."
40
- msgstr ""
41
-
42
- #: ../popup.php:30
43
- msgid "Replace Media Upload"
44
- msgstr ""
45
-
46
- #: ../popup.php:46
47
- msgid "NOTE: You are about to replace the media file"
48
- msgstr ""
49
-
50
- #: ../popup.php:46
51
- msgid "There is no undo. Think about it!"
52
- msgstr ""
53
-
54
- #: ../popup.php:48
55
- msgid "Choose a file to upload from your computer"
56
- msgstr ""
57
-
58
- #: ../popup.php:55
59
- msgid "Select media replacement type:"
60
- msgstr ""
61
-
62
- #: ../popup.php:57
63
- msgid "Just replace the file"
64
- msgstr ""
65
-
66
- #: ../popup.php:58
67
- msgid "Note: This option requires you to upload a file of the same type ("
68
- msgstr ""
69
-
70
- #: ../popup.php:58
71
- msgid ""
72
- ") as the one you are replacing. The name of the attachment will stay the "
73
- "same ("
74
- msgstr ""
75
-
76
- #: ../popup.php:58
77
- msgid ") no matter what the file you upload is called."
78
- msgstr ""
79
-
80
- #: ../popup.php:61
81
- msgid "Replace the file, use new file name and update all links"
82
- msgstr ""
83
-
84
- #: ../popup.php:62
85
- msgid ""
86
- "Note: If you check this option, the name and type of the file you are about "
87
- "to upload will replace the old file. All links pointing to the current file ("
88
- msgstr ""
89
-
90
- #: ../popup.php:62
91
- msgid ") will be updated to point to the new file name."
92
- msgstr ""
93
-
94
- #: ../popup.php:63
95
- msgid ""
96
- "Please note that if you upload a new image, only embeds/links of the "
97
- "original size image will be replaced in your posts."
98
- msgstr ""
99
-
100
- #: ../popup.php:68
101
- msgid "Upload"
102
- msgstr ""
103
-
104
- #: ../popup.php:68
105
- msgid "Cancel"
106
- msgstr ""
107
-
108
- #: ../upload.php:26
109
- #, php-format
110
- msgid ""
111
- "The file %1$s can not be deleted by the web server, most likely because the "
112
- "permissions on the file are wrong."
113
- msgstr ""
114
-
115
- #: ../upload.php:84
116
- msgid "File type does not meet security guidelines. Try another."
117
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/notice.php DELETED
@@ -1,31 +0,0 @@
1
- <div class='notice' id='emr-news' style="padding-top: 7px">
2
- <div style="float:right;"><a href="javascript:emrDismissNews()" class="button" style="margin-top:10px;"><?php _e('Dismiss', 'enable-media-replace');?></a></div>
3
- <h3 style="margin:10px;"><?php _e('Enable Media Replace recommends optimizing your images with ShortPixel','enable-media-replace');?></h3>
4
- <p><strong>
5
- <a href="https://shortpixel.com/h/af/VKG6LYN28044" target="_blank">
6
- <?php _e( 'Test your website with ShortPixel for free to see how much you could gain by optimizing your images.', 'enable-media-replace' ); ?>
7
- </a>
8
- </strong></p>
9
- <a href="https://shortpixel.com/h/af/VKG6LYN28044" target="_blank" style="float: left;margin-right: 10px;">
10
- <img src="<?php echo plugins_url('img/sp.png', __FILE__ ); ?>" class="emr-sp"/>
11
- </a>
12
- <p style="margin-bottom:0px;">
13
- <?php _e( 'ShortPixel is an easy to use, comprehensive, stable and frequently updated image optimization plugin supported by the friendly team that created it. Using a powerful set of specially tuned algorithms, it squeezes the most of each image striking the best balance between image size and quality. Current images can be all optimized with a single click. Newly added images are automatically resized/rescaled and optimized on the fly, in the background.', 'enable-media-replace' ); ?>
14
- </p>
15
- <p style="text-align: right;margin-top: 0;">
16
- <a href="https://shortpixel.com/h/af/VKG6LYN28044" target="_blank">&gt;&gt; <?php _e( 'More info', 'enable-media-replace' ); ?></a>
17
- </p>
18
- </div>
19
- <script>
20
- function emrDismissNews() {
21
- jQuery("#emr-news").hide();
22
- var data = { action : 'emr_dismiss_notices'};
23
- jQuery.get('<?php echo admin_url('admin-ajax.php'); ?>', data, function(response) {
24
- data = JSON.parse(response);
25
- if(data["Status"] == 0) {
26
- console.log("dismissed");
27
- }
28
- });
29
- }
30
- </script>
31
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/popup.php DELETED
@@ -1,69 +0,0 @@
1
- <?php
2
- /**
3
- * Uploadscreen for selecting and uploading new media file
4
- *
5
- * @author Måns Jonasson <http://www.mansjonasson.se>
6
- * @copyright Måns Jonasson 13 sep 2010
7
- * @version $Revision: 2303 $ | $Date: 2010-09-13 11:12:35 +0200 (ma, 13 sep 2010) $
8
- * @package wordpress
9
- * @subpackage enable-media-replace
10
- *
11
- */
12
-
13
- if (!current_user_can('upload_files'))
14
- wp_die(__('You do not have permission to upload files.', 'enable-media-replace'));
15
-
16
- global $wpdb;
17
-
18
- $table_name = $wpdb->prefix . "posts";
19
-
20
- $sql = "SELECT guid, post_mime_type FROM $table_name WHERE ID = " . (int) $_GET["attachment_id"];
21
-
22
- list($current_filename, $current_filetype) = $wpdb->get_row($sql, ARRAY_N);
23
-
24
- $current_filename = substr($current_filename, (strrpos($current_filename, "/") + 1));
25
-
26
-
27
- ?>
28
- <div class="wrap">
29
- <h1><?php echo __("Replace Media Upload", "enable-media-replace"); ?></h1>
30
-
31
- <?php
32
- $url = admin_url( "upload.php?page=enable-media-replace/enable-media-replace.php&noheader=true&action=media_replace_upload&attachment_id=" . (int) $_GET["attachment_id"]);
33
- $action = "media_replace_upload";
34
- $formurl = wp_nonce_url( $url, $action );
35
- if (FORCE_SSL_ADMIN) {
36
- $formurl = str_replace("http:", "https:", $formurl);
37
- }
38
- ?>
39
-
40
- <form enctype="multipart/form-data" method="post" action="<?php echo $formurl; ?>">
41
- <?php
42
- #wp_nonce_field('enable-media-replace');
43
- ?>
44
- <input type="hidden" name="ID" value="<?php echo (int) $_GET["attachment_id"]; ?>" />
45
- <div id="message" class="updated notice notice-success is-dismissible"><p><?php printf( __('NOTE: You are about to replace the media file "%s". There is no undo. Think about it!', "enable-media-replace"), $current_filename ); ?></p></div>
46
-
47
- <p><?php echo __("Choose a file to upload from your computer", "enable-media-replace"); ?></p>
48
-
49
- <input type="file" name="userfile" />
50
-
51
- <?php do_action( 'emr_before_replace_type_options' ); ?>
52
-
53
- <?php if ( apply_filters( 'emr_display_replace_type_options', true ) ) : ?>
54
- <p><?php echo __("Select media replacement type:", "enable-media-replace"); ?></p>
55
-
56
- <label for="replace_type_1"><input CHECKED id="replace_type_1" type="radio" name="replace_type" value="replace"> <?php echo __("Just replace the file", "enable-media-replace"); ?></label>
57
- <p class="howto"><?php printf( __("Note: This option requires you to upload a file of the same type (%s) as the one you are replacing. The name of the attachment will stay the same (%s) no matter what the file you upload is called.", "enable-media-replace"), $current_filetype, $current_filename ); ?></p>
58
-
59
- <?php if ( apply_filters( 'emr_enable_replace_and_search', true ) ) : ?>
60
- <label for="replace_type_2"><input id="replace_type_2" type="radio" name="replace_type" value="replace_and_search"> <?php echo __("Replace the file, use new file name and update all links", "enable-media-replace"); ?></label>
61
- <p class="howto"><?php printf( __("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 (%s) will be updated to point to the new file name.", "enable-media-replace"), $current_filename ); ?></p>
62
- <p class="howto"><?php echo __("Please note that if you upload a new image, only embeds/links of the original size image will be replaced in your posts.", "enable-media-replace"); ?></p>
63
- <?php endif; ?>
64
- <?php else : ?>
65
- <input type="hidden" name="replace_type" value="replace" />
66
- <?php endif; ?>
67
- <input type="submit" class="button" value="<?php echo __("Upload", "enable-media-replace"); ?>" /> <a href="#" onclick="history.back();"><?php echo __("Cancel", "enable-media-replace"); ?></a>
68
- </form>
69
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/readme.txt DELETED
@@ -1,227 +0,0 @@
1
- === Enable Media Replace ===
2
- Contributors: mungobbq
3
- Tags: admin, attachment, media, files
4
- Requires at least: 4.0
5
- Tested up to: 4.9.4
6
- Stable tag: trunk
7
-
8
- Enables replacing attachment files by simply uploading a new file in the media library edit view.
9
-
10
- == Description ==
11
-
12
- This plugin allows you to replace a file in your media library by uploading a new file in its place. No more deleting, renaming and re-uploading files!
13
-
14
- #### A real timesaver
15
-
16
- Don't you find it tedious and complicated to have to first delete a file and then upload one with the exact same name every time you want to update an image or any uploaded file inside the WordPress media library?
17
-
18
- Well, no longer!
19
-
20
- Now you'll be able to replace any uploaded file from the media "edit" view, where it should be. Media replacement can be done in one of two ways:
21
-
22
- #### It's simple to replace a file
23
-
24
- 1. Just replace the file. This option requires you to upload a file of the same type as the one you are replacing. The name of the attachment will stay the same no matter what the file you upload is called.
25
- 1. Replace the file, use new file name and update all links. 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 will be updated to point to the new file name.
26
-
27
- This plugin is very powerful and a must-have for any larger sites built with WordPress.
28
-
29
- #### Display file modification time
30
-
31
- There is a shortcode available which picks up the file modification date and displays it in a post or a page. The code is:
32
- `[file_modified id=XX format=XXXX]` where the "id" is required and the "format" is optional and defaults to your current WordPress settings for date and time format.
33
-
34
- So `[file_modified id=870]` would display the last time the file with ID 870 was updated on your site. To get the ID for a file, check the URL when editing a file in the media library (see screenshot #4)
35
-
36
- If you want more control over the format used to display the time, you can use the format option, so `[file_modified id=870 format=Y-m-d]` would display the file modification date but not the time. The format string uses [standard PHP date() formatting tags](http://php.net/manual/en/function.date.php).
37
-
38
- == Changelog ==
39
-
40
- = 3.2 =
41
- * Tested with WP 4.9.4
42
- * Added Shortpixel link in replace media screen
43
-
44
- = 3.1.1 =
45
- * Fixed bug introduced in an earlier version, preventing the updating of URLs on pages/posts if the link did not contain the domain name
46
-
47
- = 3.1 =
48
- * Got rid of some pesky old code, and added some better filtering options, thanks to GitHub users speerface, aaemnnosttv, and ururk
49
- * Brand new, shiny code to replace other image sizes in embeded media, thanks to GitHub user ianmjones!
50
- * Tested with WP 4.8
51
-
52
- = 3.0.6 =
53
- * Tested with WP 4.7.2
54
- * New PT translations (thanks Pedro Mendonca! https://github.com/mansj/enable-media-replace/commit/b6e63b9a8a3ae46b3a6664bd5bbf19b2beaf9d3f)
55
-
56
- = 3.0.5 =
57
- * Tested with WP 4.6.1
58
-
59
- = 3.0.4 =
60
- * Fixed typo in .pt translations (https://github.com/mansj/enable-media-replace/pull/18)
61
- * Fixed better error handling in modification date functions (https://github.com/mansj/enable-media-replace/pull/16)
62
- * Tested with WP 4.4.1
63
-
64
- = 3.0.3 =
65
- * Scrapped old method of detecting media screen, button to replace media will now show up in more places, yay!
66
- * Made sure the call to get_attached_file() no longer skips filters, in response to several users wishes.
67
- * Suppressed error messages on chmod()
68
- * Added Japanese translation (Thank you, chacomv!)
69
-
70
- = 3.0.2 =
71
- * Cleaned up language files
72
- * Added Portuguese translation (Thanks pedro-mendonca!)
73
- * Tested with WP 4.1
74
- * Added missing Swedish translation strings
75
-
76
- = 3.0.1 =
77
- * Tiny fix to re-insert the EMR link in the media list view.
78
-
79
- = 3.0 =
80
- * Updated for WordPress 4.0
81
- * Now inheriting permissions of the replaced files, [Thank you Fiwad](https://github.com/fiwad)
82
-
83
- = 2.9.7RC1 =
84
- * Moved localization files into own directory. [Thank you Michael](https://github.com/michael-cannon)
85
- * Moved screensots into own directory. [Thank you Michael](https://github.com/michael-cannon)
86
-
87
- = 2.9.6 =
88
- * Added fix by Grant K Norwood to address a possible security problem in SQL statements. Thanks Grant!
89
- * Created GitHub repo for this plugin, please feel free to contribute at github.com/mansj/enable-media-replace
90
-
91
- = 2.9.5 =
92
- * Bug fix for the short code displaying the modification date of a file
93
- * Updated all database queries in preparation for WP 3.9
94
-
95
- = 2.9.4 =
96
- * Bug fix for timezone changes in WordPress
97
- * Minor UI change to inform the user about what actually happens when replacing an image and using a new file name
98
-
99
- = 2.9.3 =
100
- * Added call to update_attached_file() which should purge changed files for various CDN and cache plugs. Thanks Dylan Barlett for the suggestion! (http://wordpress.org/support/topic/compatibility-with-w3-total-cache)
101
- * Suppressed possible error in new hook added in 2.9.2
102
-
103
- = 2.9.2 =
104
- * Small bug fix
105
- * Added hook for developers to enable purging possible CDN when updating files - thanks rubious for the suggestion!
106
-
107
- = 2.9.1 =
108
- * Added Brazilian Portuguese translation, thanks Roger Nobrega!
109
- * Added filter hook for file name creation, thanks to Jonas Lundman for the code!
110
- * Added modification date to the edit attachment screen, thanks to Jonas Lundman for the code!
111
- * Enhanced the deletion method for old file/image thumbnails to never give unnecessary error messages and more accurately delete orphaned thumbs
112
-
113
- = 2.9 =
114
- * Added Portuguese translation, thanks Bruno Miguel Bras Silva!
115
- * New edit link from media library
116
- * After uploading, the plugin now takes you back to edit screen instead of library
117
-
118
- = 2.8.2 =
119
- * Made another change to the discovery of media context which will hopefully fix a bug in certain cases. Thanks to "Joolee" at the WordPress.org forums!
120
- * Added a new, supposedly better Russian translation from "Vlad".
121
-
122
- = 2.8.1 =
123
- * Fixed a small bug which could create error messages on some systems when deleting old image files.
124
-
125
- = 2.8 =
126
- * New and safer method for deleting thumbnails when a new image file is uploaded.
127
- * New translations for simplified Chinese (thanks Tunghsiao Liu) and Italian (grazie Marco Chiesi)
128
- * Added method for detecting upload screen to ensure backwards compatibility with versions pre 3.5
129
-
130
- = 2.7 =
131
- * A couple of changes made to ensure compatibility with WordPress 3.5. Thanks to Elizabeth Powell for the fixes!
132
-
133
- = 2.6 =
134
- * New and improved validation of uploaded files, now using WP's own functions for checking file type and extension. Thanks again to my old friend Ulf "Årsta" Härnhammar for keeping us all on our toes! :) This should also hopefully fix the problems people have been having with their installations claiming that perfectly good PDF files are not allowed file types.
135
-
136
- = 2.5.2 =
137
- * The "more reliable way" of determining MIME types turned out to be less reliable. Go figure. There seems to be no perfect way of performing a reliable check for MIME-types on an uploaded file that is also truly portable. I have now made checks for the availability of mime_content_type() before using it, using the old method as a fall-back. It is far from beautiful, so if anybody has a better way of doing it, please contact me!
138
-
139
- = 2.5.1 =
140
- * Bug fix - there is now a more reliable way of determining file type on your upload so you can upload PDF files without seeing that pesky "File type does not meet security guidelines" message.
141
- * New translation to Danish - thanks to Michael Bering Petersen!
142
-
143
- = 2.5 =
144
- * Tested with WordPress 3.2.1
145
- * New translation to German - thanks to Martin Lettner!
146
- * New translation to French - thanks to François Collette!
147
-
148
- = 2.4.1 =
149
- * Bug fix for WordPress 3.1 RC. Now properly tested and should be working with 3.1 whenever it finally comes out. :)
150
-
151
- = 2.4 =
152
- * Bug fixes, security fixes. Thanks to my old pal Ulf "&Aring;rsta" H&auml;rnhammar for pointing them out!
153
- * New method for uploading avoids going around WP, for greater security.
154
-
155
- = 2.3 =
156
- * Lots of code trimmed and enhanced, thanks to Ben ter Stal! Now working properly with Windows systems, better security, optimized loading, and much more.
157
- * Added Dutch translation by Ben ter Stal.
158
-
159
- = 2.2 =
160
- * Bug fix, fixed typo in popup.php, thanks to Bill Dennen and others for pointing this out!
161
-
162
- = 2.1 =
163
- * New shortcode - display file modification date on your site (see description for more info)
164
- * A couple of bug fixes for final release of 3.0 - Thanks to Jim Isaacs for pointing them out!
165
-
166
- = 2.0.1 =
167
- * Added support for SSL admin
168
-
169
- = 2.0 =
170
- * Replaced popup with inline navigation when replacing media
171
- * Added instructions in admin link under Media
172
-
173
- = 1.4.1 =
174
- * Tested with WordPress 3.0 beta 2
175
-
176
- = 1.4 =
177
- * Removed short tags for better compatibility.
178
-
179
- = 1.3 =
180
- * Added support for wp_config setting "FORCE_SSL_ADMIN"
181
-
182
- = 1.2 =
183
- * Added Russian translation, thanks to Fat Cower.
184
-
185
- = 1.1 =
186
- * Minor bugfix, now working with IE8 too!
187
-
188
- = 1.0 =
189
- * First stable version of plugin.
190
-
191
- == Installation ==
192
-
193
- Quick and easy installation:
194
-
195
- 1. Upload the folder `enable-media-replace` to your plugin directory
196
- 1. Activate the plugin through the 'Plugins' menu in WordPress
197
- 1. Done!
198
-
199
- == Frequently Asked Questions ==
200
-
201
- = What does this plugin actually do? =
202
-
203
- This plugin makes it easy to update/replace files that have been uploaded to the WordPress Media Library.
204
-
205
- = How does it work? =
206
-
207
- A new option will be available in the Edit Media view, called "Replace Media". This is where you can upload a new file to replace the old one.
208
-
209
- = I replaced a file, but it didn't change! =
210
-
211
- There are two main reasons this would happen.
212
-
213
- First, make sure you are not viewing a cached version of the file, especially if you replaced an image. Press "Refresh" in your browser to make sure.
214
-
215
- Second, if the file really looks unchanged, make sure WordPress has write permissions to the files in your uploads folder. If you have ever moved your WP installation (maybe when you moved it to a new server), the permissions on your uploaded files are commonly reset so that WordPress no longer has permissions to change the files. If you don't know how to do this, contact your web server operator.
216
-
217
- == Screenshots ==
218
-
219
- 1. The new link in the media library.
220
- 2. The replace media-button as seen in the "Edit media" view.
221
- 3. The upload options.
222
- 4. Get the file ID in the edit file URL
223
-
224
- == Wishlist / Coming attractons ==
225
-
226
- Do you have suggestions? Feel free to contact me at mans@mansjonasson.se
227
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/upload.php DELETED
@@ -1,360 +0,0 @@
1
- <?php
2
- if (!current_user_can('upload_files'))
3
- wp_die(__('You do not have permission to upload files.', 'enable-media-replace'));
4
-
5
- // Define DB table names
6
- global $wpdb;
7
- $table_name = $wpdb->prefix . "posts";
8
- $postmeta_table_name = $wpdb->prefix . "postmeta";
9
-
10
- /**
11
- * Delete a media file and its thumbnails.
12
- *
13
- * @param string $current_file
14
- * @param array|null $metadta
15
- */
16
- function emr_delete_current_files( $current_file, $metadta = null ) {
17
- // Delete old file
18
-
19
- // Find path of current file
20
- $current_path = substr($current_file, 0, (strrpos($current_file, "/")));
21
-
22
- // Check if old file exists first
23
- if (file_exists($current_file)) {
24
- // Now check for correct file permissions for old file
25
- clearstatcache();
26
- if (is_writable($current_file)) {
27
- // Everything OK; delete the file
28
- unlink($current_file);
29
- }
30
- else {
31
- // File exists, but has wrong permissions. Let the user know.
32
- printf(__('The file %1$s can not be deleted by the web server, most likely because the permissions on the file are wrong.', "enable-media-replace"), $current_file);
33
- exit;
34
- }
35
- }
36
-
37
- // Delete old resized versions if this was an image
38
- $suffix = substr($current_file, (strlen($current_file)-4));
39
- $prefix = substr($current_file, 0, (strlen($current_file)-4));
40
- $imgAr = array(".png", ".gif", ".jpg");
41
- if (in_array($suffix, $imgAr)) {
42
- // It's a png/gif/jpg based on file name
43
- // Get thumbnail filenames from metadata
44
- if ( empty( $metadata ) ) {
45
- $metadata = wp_get_attachment_metadata( $_POST["ID"] );
46
- }
47
-
48
- if (is_array($metadata)) { // Added fix for error messages when there is no metadata (but WHY would there not be? I don't know…)
49
- foreach($metadata["sizes"] AS $thissize) {
50
- // Get all filenames and do an unlink() on each one;
51
- $thisfile = $thissize["file"];
52
- // Create array with all old sizes for replacing in posts later
53
- $oldfilesAr[] = $thisfile;
54
- // Look for files and delete them
55
- if (strlen($thisfile)) {
56
- $thisfile = $current_path . "/" . $thissize["file"];
57
- if (file_exists($thisfile)) {
58
- unlink($thisfile);
59
- }
60
- }
61
- }
62
- }
63
- // Old (brutal) method, left here for now
64
- //$mask = $prefix . "-*x*" . $suffix;
65
- //array_map( "unlink", glob( $mask ) );
66
- }
67
-
68
- }
69
-
70
- /**
71
- * Maybe remove query string from URL.
72
- *
73
- * @param string $url
74
- *
75
- * @return string
76
- */
77
- function emr_maybe_remove_query_string( $url ) {
78
- $parts = explode( '?', $url );
79
-
80
- return reset( $parts );
81
- }
82
-
83
- /**
84
- * Remove scheme from URL.
85
- *
86
- * @param string $url
87
- *
88
- * @return string
89
- */
90
- function emr_remove_scheme( $url ) {
91
- return preg_replace( '/^(?:http|https):/', '', $url );
92
- }
93
-
94
- /**
95
- * Remove size from filename (image[-100x100].jpeg).
96
- *
97
- * @param string $url
98
- * @param bool $remove_extension
99
- *
100
- * @return string
101
- */
102
- function emr_remove_size_from_filename( $url, $remove_extension = false ) {
103
- $url = preg_replace( '/^(\S+)-[0-9]{1,4}x[0-9]{1,4}(\.[a-zA-Z0-9\.]{2,})?/', '$1$2', $url );
104
-
105
- if ( $remove_extension ) {
106
- $ext = pathinfo( $url, PATHINFO_EXTENSION );
107
- $url = str_replace( ".$ext", '', $url );
108
- }
109
-
110
- return $url;
111
- }
112
-
113
- /**
114
- * Strip an image URL down to bare minimum for matching.
115
- *
116
- * @param string $url
117
- *
118
- * @return string
119
- */
120
- function emr_get_match_url($url) {
121
- $url = emr_remove_scheme($url);
122
- $url = emr_maybe_remove_query_string($url);
123
- $url = emr_remove_size_from_filename($url, true);
124
- $url = emr_remove_domain_from_filename($url);
125
-
126
- return $url;
127
- }
128
-
129
-
130
- function emr_remove_domain_from_filename($url) {
131
- // Holding place for possible future function
132
- $url = str_replace(emr_remove_scheme(get_bloginfo('url')), '', $url);
133
- return $url;
134
- }
135
-
136
- /**
137
- * Build an array of search or replace URLs for given attachment GUID and its metadata.
138
- *
139
- * @param string $guid
140
- * @param array $metadata
141
- *
142
- * @return array
143
- */
144
- function emr_get_file_urls( $guid, $metadata ) {
145
- $urls = array();
146
-
147
- $guid = emr_remove_scheme( $guid );
148
- $guid= emr_remove_domain_from_filename($guid);
149
-
150
- $urls['guid'] = $guid;
151
-
152
- if ( empty( $metadata ) ) {
153
- return $urls;
154
- }
155
-
156
- $base_url = dirname( $guid );
157
-
158
- if ( ! empty( $metadata['file'] ) ) {
159
- $urls['file'] = trailingslashit( $base_url ) . wp_basename( $metadata['file'] );
160
- }
161
-
162
- if ( ! empty( $metadata['sizes'] ) ) {
163
- foreach ( $metadata['sizes'] as $key => $value ) {
164
- $urls[ $key ] = trailingslashit( $base_url ) . wp_basename( $value['file'] );
165
- }
166
- }
167
-
168
- return $urls;
169
- }
170
-
171
- /**
172
- * Ensure new search URLs cover known sizes for old attachment.
173
- * Falls back to full URL if size not covered (srcset or width/height attributes should compensate).
174
- *
175
- * @param array $old
176
- * @param array $new
177
- *
178
- * @return array
179
- */
180
- function emr_normalize_file_urls( $old, $new ) {
181
- $result = array();
182
-
183
- if ( empty( $new['guid'] ) ) {
184
- return $result;
185
- }
186
-
187
- $guid = $new['guid'];
188
-
189
- foreach ( $old as $key => $value ) {
190
- $result[ $key ] = empty( $new[ $key ] ) ? $guid : $new[ $key ];
191
- }
192
-
193
- return $result;
194
- }
195
-
196
- // Get old guid and filetype from DB
197
- $sql = "SELECT guid, post_mime_type FROM $table_name WHERE ID = '" . (int) $_POST["ID"] . "'";
198
- list($current_filename, $current_filetype) = $wpdb->get_row($sql, ARRAY_N);
199
-
200
- // Massage a bunch of vars
201
- $current_guid = $current_filename;
202
- $current_filename = substr($current_filename, (strrpos($current_filename, "/") + 1));
203
-
204
- $current_file = get_attached_file((int) $_POST["ID"], apply_filters( 'emr_unfiltered_get_attached_file', true ));
205
- $current_path = substr($current_file, 0, (strrpos($current_file, "/")));
206
- $current_file = str_replace("//", "/", $current_file);
207
- $current_filename = basename($current_file);
208
- $current_metadata = wp_get_attachment_metadata( $_POST["ID"] );
209
-
210
- $replace_type = $_POST["replace_type"];
211
- // We have two types: replace / replace_and_search
212
-
213
- if (is_uploaded_file($_FILES["userfile"]["tmp_name"])) {
214
-
215
- // New method for validating that the uploaded file is allowed, using WP:s internal wp_check_filetype_and_ext() function.
216
- $filedata = wp_check_filetype_and_ext($_FILES["userfile"]["tmp_name"], $_FILES["userfile"]["name"]);
217
-
218
- if ($filedata["ext"] == "") {
219
- echo __("File type does not meet security guidelines. Try another.", 'enable-media-replace');
220
- exit;
221
- }
222
-
223
- $new_filename = $_FILES["userfile"]["name"];
224
- $new_filesize = $_FILES["userfile"]["size"];
225
- $new_filetype = $filedata["type"];
226
-
227
- // save original file permissions
228
- $original_file_perms = fileperms($current_file) & 0777;
229
-
230
- if ($replace_type == "replace") {
231
- // Drop-in replace and we don't even care if you uploaded something that is the wrong file-type.
232
- // That's your own fault, because we warned you!
233
-
234
- emr_delete_current_files( $current_file, $current_metadata );
235
-
236
- // Move new file to old location/name
237
- move_uploaded_file($_FILES["userfile"]["tmp_name"], $current_file);
238
-
239
- // Chmod new file to original file permissions
240
- @chmod($current_file, $original_file_perms);
241
-
242
- // Make thumb and/or update metadata
243
- wp_update_attachment_metadata( (int) $_POST["ID"], wp_generate_attachment_metadata( (int) $_POST["ID"], $current_file ) );
244
-
245
- // Trigger possible updates on CDN and other plugins
246
- update_attached_file( (int) $_POST["ID"], $current_file);
247
- } elseif ( 'replace_and_search' == $replace_type && apply_filters( 'emr_enable_replace_and_search', true ) ) {
248
- // Replace file, replace file name, update meta data, replace links pointing to old file name
249
-
250
- emr_delete_current_files( $current_file, $current_metadata );
251
-
252
- // Massage new filename to adhere to WordPress standards
253
- $new_filename = wp_unique_filename( $current_path, $new_filename );
254
- $new_filename = apply_filters( 'emr_unique_filename', $new_filename, $current_path, (int) $_POST['ID'] );
255
-
256
- // Move new file to old location, new name
257
- $new_file = $current_path . "/" . $new_filename;
258
- move_uploaded_file($_FILES["userfile"]["tmp_name"], $new_file);
259
-
260
- // Chmod new file to original file permissions
261
- @chmod($current_file, $original_file_perms);
262
-
263
- $new_filetitle = preg_replace('/\.[^.]+$/', '', basename($new_file));
264
- $new_filetitle = apply_filters( 'enable_media_replace_title', $new_filetitle ); // Thanks Jonas Lundman (http://wordpress.org/support/topic/add-filter-hook-suggestion-to)
265
- $new_guid = str_replace($current_filename, $new_filename, $current_guid);
266
-
267
- // Update database file name
268
- $sql = $wpdb->prepare(
269
- "UPDATE $table_name SET post_title = '$new_filetitle', post_name = '$new_filetitle', guid = '$new_guid', post_mime_type = '$new_filetype' WHERE ID = %d;",
270
- (int) $_POST["ID"]
271
- );
272
- $wpdb->query($sql);
273
-
274
- // Update the postmeta file name
275
-
276
- // Get old postmeta _wp_attached_file
277
- $sql = $wpdb->prepare(
278
- "SELECT meta_value FROM $postmeta_table_name WHERE meta_key = '_wp_attached_file' AND post_id = %d;",
279
- (int) $_POST["ID"]
280
- );
281
-
282
- $old_meta_name = $wpdb->get_row($sql, ARRAY_A);
283
- $old_meta_name = $old_meta_name["meta_value"];
284
-
285
- // Make new postmeta _wp_attached_file
286
- $new_meta_name = str_replace($current_filename, $new_filename, $old_meta_name);
287
- $sql = $wpdb->prepare(
288
- "UPDATE $postmeta_table_name SET meta_value = '$new_meta_name' WHERE meta_key = '_wp_attached_file' AND post_id = %d;",
289
- (int) $_POST["ID"]
290
- );
291
- $wpdb->query($sql);
292
-
293
- // Make thumb and/or update metadata
294
- $new_metadata = wp_generate_attachment_metadata( (int) $_POST["ID"], $new_file );
295
- wp_update_attachment_metadata( (int) $_POST["ID"], $new_metadata );
296
-
297
- // Search-and-replace filename in post database
298
- $current_base_url = emr_get_match_url( $current_guid );
299
-
300
- $sql = $wpdb->prepare(
301
- "SELECT ID, post_content FROM $table_name WHERE post_status = 'publish' AND post_content LIKE %s;",
302
- '%' . $current_base_url . '%'
303
- );
304
-
305
-
306
- $rs = $wpdb->get_results( $sql, ARRAY_A );
307
-
308
- $number_of_updates = 0;
309
-
310
-
311
- if ( ! empty( $rs ) ) {
312
- $search_urls = emr_get_file_urls( $current_guid, $current_metadata );
313
- $replace_urls = emr_get_file_urls( $new_guid, $new_metadata );
314
- $replace_urls = emr_normalize_file_urls( $search_urls, $replace_urls );
315
-
316
-
317
- foreach ( $rs AS $rows ) {
318
-
319
- $number_of_updates = $number_of_updates + 1;
320
-
321
- // replace old URLs with new URLs.
322
- $post_content = $rows["post_content"];
323
- $post_content = addslashes( str_replace( $search_urls, $replace_urls, $post_content ) );
324
-
325
- $sql = $wpdb->prepare(
326
- "UPDATE $table_name SET post_content = '$post_content' WHERE ID = %d;",
327
- $rows["ID"]
328
- );
329
-
330
- $wpdb->query( $sql );
331
- }
332
- }
333
-
334
- // Trigger possible updates on CDN and other plugins
335
- update_attached_file( (int) $_POST["ID"], $new_file );
336
- }
337
-
338
- #echo "Updated: " . $number_of_updates;
339
-
340
- $returnurl = admin_url("/post.php?post={$_POST["ID"]}&action=edit&message=1");
341
-
342
- // Execute hook actions - thanks rubious for the suggestion!
343
- if (isset($new_guid)) { do_action("enable-media-replace-upload-done", $new_guid, $current_guid); }
344
-
345
- } else {
346
- //TODO Better error handling when no file is selected.
347
- //For now just go back to media management
348
- $returnurl = admin_url("/wp-admin/upload.php");
349
- }
350
-
351
- if (FORCE_SSL_ADMIN) {
352
- $returnurl = str_replace("http:", "https:", $returnurl);
353
- }
354
-
355
- // Allow developers to override $returnurl
356
- $returnurl = apply_filters('emr_returnurl', $returnurl);
357
-
358
- //save redirection
359
- wp_redirect($returnurl);
360
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
upload.php CHANGED
@@ -13,32 +13,32 @@ $postmeta_table_name = $wpdb->prefix . "postmeta";
13
  * @param string $current_file
14
  * @param array|null $metadta
15
  */
16
- function emr_delete_current_files( $current_file, $metadta = null ) {
17
  // Delete old file
18
 
19
  // Find path of current file
20
  $current_path = substr($current_file, 0, (strrpos($current_file, "/")));
21
-
22
  // Check if old file exists first
23
  if (file_exists($current_file)) {
24
  // Now check for correct file permissions for old file
25
  clearstatcache();
26
- if (is_writable($current_file)) {
27
  // Everything OK; delete the file
28
  unlink($current_file);
29
  }
30
  else {
31
  // File exists, but has wrong permissions. Let the user know.
32
  printf(__('The file %1$s can not be deleted by the web server, most likely because the permissions on the file are wrong.', "enable-media-replace"), $current_file);
33
- exit;
34
  }
35
  }
36
-
37
  // Delete old resized versions if this was an image
38
  $suffix = substr($current_file, (strlen($current_file)-4));
39
  $prefix = substr($current_file, 0, (strlen($current_file)-4));
40
  $imgAr = array(".png", ".gif", ".jpg");
41
- if (in_array($suffix, $imgAr)) {
42
  // It's a png/gif/jpg based on file name
43
  // Get thumbnail filenames from metadata
44
  if ( empty( $metadata ) ) {
@@ -193,6 +193,17 @@ function emr_normalize_file_urls( $old, $new ) {
193
  return $result;
194
  }
195
 
 
 
 
 
 
 
 
 
 
 
 
196
  // Get old guid and filetype from DB
197
  $sql = "SELECT guid, post_mime_type FROM $table_name WHERE ID = '" . (int) $_POST["ID"] . "'";
198
  list($current_filename, $current_filetype) = $wpdb->get_row($sql, ARRAY_N);
@@ -214,16 +225,16 @@ if (is_uploaded_file($_FILES["userfile"]["tmp_name"])) {
214
 
215
  // New method for validating that the uploaded file is allowed, using WP:s internal wp_check_filetype_and_ext() function.
216
  $filedata = wp_check_filetype_and_ext($_FILES["userfile"]["tmp_name"], $_FILES["userfile"]["name"]);
217
-
218
  if ($filedata["ext"] == "") {
219
  echo __("File type does not meet security guidelines. Try another.", 'enable-media-replace');
220
  exit;
221
  }
222
-
223
  $new_filename = $_FILES["userfile"]["name"];
224
  $new_filesize = $_FILES["userfile"]["size"];
225
  $new_filetype = $filedata["type"];
226
-
227
  // save original file permissions
228
  $original_file_perms = fileperms($current_file) & 0777;
229
 
@@ -242,7 +253,10 @@ if (is_uploaded_file($_FILES["userfile"]["tmp_name"])) {
242
  // Make thumb and/or update metadata
243
  wp_update_attachment_metadata( (int) $_POST["ID"], wp_generate_attachment_metadata( (int) $_POST["ID"], $current_file ) );
244
 
245
- // Trigger possible updates on CDN and other plugins
 
 
 
246
  update_attached_file( (int) $_POST["ID"], $current_file);
247
  } elseif ( 'replace_and_search' == $replace_type && apply_filters( 'emr_enable_replace_and_search', true ) ) {
248
  // Replace file, replace file name, update meta data, replace links pointing to old file name
@@ -278,7 +292,7 @@ if (is_uploaded_file($_FILES["userfile"]["tmp_name"])) {
278
  "SELECT meta_value FROM $postmeta_table_name WHERE meta_key = '_wp_attached_file' AND post_id = %d;",
279
  (int) $_POST["ID"]
280
  );
281
-
282
  $old_meta_name = $wpdb->get_row($sql, ARRAY_A);
283
  $old_meta_name = $old_meta_name["meta_value"];
284
 
@@ -294,6 +308,9 @@ if (is_uploaded_file($_FILES["userfile"]["tmp_name"])) {
294
  $new_metadata = wp_generate_attachment_metadata( (int) $_POST["ID"], $new_file );
295
  wp_update_attachment_metadata( (int) $_POST["ID"], $new_metadata );
296
 
 
 
 
297
  // Search-and-replace filename in post database
298
  $current_base_url = emr_get_match_url( $current_guid );
299
 
@@ -301,23 +318,23 @@ if (is_uploaded_file($_FILES["userfile"]["tmp_name"])) {
301
  "SELECT ID, post_content FROM $table_name WHERE post_status = 'publish' AND post_content LIKE %s;",
302
  '%' . $current_base_url . '%'
303
  );
304
-
305
-
306
  $rs = $wpdb->get_results( $sql, ARRAY_A );
307
 
308
  $number_of_updates = 0;
309
-
310
-
311
  if ( ! empty( $rs ) ) {
312
  $search_urls = emr_get_file_urls( $current_guid, $current_metadata );
313
  $replace_urls = emr_get_file_urls( $new_guid, $new_metadata );
314
  $replace_urls = emr_normalize_file_urls( $search_urls, $replace_urls );
315
 
316
-
317
  foreach ( $rs AS $rows ) {
318
-
319
  $number_of_updates = $number_of_updates + 1;
320
-
321
  // replace old URLs with new URLs.
322
  $post_content = $rows["post_content"];
323
  $post_content = addslashes( str_replace( $search_urls, $replace_urls, $post_content ) );
@@ -331,17 +348,17 @@ if (is_uploaded_file($_FILES["userfile"]["tmp_name"])) {
331
  }
332
  }
333
 
334
- // Trigger possible updates on CDN and other plugins
335
  update_attached_file( (int) $_POST["ID"], $new_file );
336
  }
337
-
338
  #echo "Updated: " . $number_of_updates;
339
 
340
  $returnurl = admin_url("/post.php?post={$_POST["ID"]}&action=edit&message=1");
341
-
342
  // Execute hook actions - thanks rubious for the suggestion!
343
  if (isset($new_guid)) { do_action("enable-media-replace-upload-done", $new_guid, $current_guid); }
344
-
345
  } else {
346
  //TODO Better error handling when no file is selected.
347
  //For now just go back to media management
13
  * @param string $current_file
14
  * @param array|null $metadta
15
  */
16
+ function emr_delete_current_files( $current_file, $metadata = null ) {
17
  // Delete old file
18
 
19
  // Find path of current file
20
  $current_path = substr($current_file, 0, (strrpos($current_file, "/")));
21
+
22
  // Check if old file exists first
23
  if (file_exists($current_file)) {
24
  // Now check for correct file permissions for old file
25
  clearstatcache();
26
+ if (is_writable(dirname($current_file))) {
27
  // Everything OK; delete the file
28
  unlink($current_file);
29
  }
30
  else {
31
  // File exists, but has wrong permissions. Let the user know.
32
  printf(__('The file %1$s can not be deleted by the web server, most likely because the permissions on the file are wrong.', "enable-media-replace"), $current_file);
33
+ exit;
34
  }
35
  }
36
+
37
  // Delete old resized versions if this was an image
38
  $suffix = substr($current_file, (strlen($current_file)-4));
39
  $prefix = substr($current_file, 0, (strlen($current_file)-4));
40
  $imgAr = array(".png", ".gif", ".jpg");
41
+ if (in_array($suffix, $imgAr)) {
42
  // It's a png/gif/jpg based on file name
43
  // Get thumbnail filenames from metadata
44
  if ( empty( $metadata ) ) {
193
  return $result;
194
  }
195
 
196
+ function emr_update_modified_dates( $attachment_id ) {
197
+ $attachment = array(
198
+ 'ID' => $attachment_id,
199
+ 'post_modified_gmt' => date("Y-m-d h:m:i"),
200
+ 'post_modified' => current_time('mysql'),
201
+ );
202
+
203
+ // Update the post modified dates into the database
204
+ wp_update_post( $attachment );
205
+ }
206
+
207
  // Get old guid and filetype from DB
208
  $sql = "SELECT guid, post_mime_type FROM $table_name WHERE ID = '" . (int) $_POST["ID"] . "'";
209
  list($current_filename, $current_filetype) = $wpdb->get_row($sql, ARRAY_N);
225
 
226
  // New method for validating that the uploaded file is allowed, using WP:s internal wp_check_filetype_and_ext() function.
227
  $filedata = wp_check_filetype_and_ext($_FILES["userfile"]["tmp_name"], $_FILES["userfile"]["name"]);
228
+
229
  if ($filedata["ext"] == "") {
230
  echo __("File type does not meet security guidelines. Try another.", 'enable-media-replace');
231
  exit;
232
  }
233
+
234
  $new_filename = $_FILES["userfile"]["name"];
235
  $new_filesize = $_FILES["userfile"]["size"];
236
  $new_filetype = $filedata["type"];
237
+
238
  // save original file permissions
239
  $original_file_perms = fileperms($current_file) & 0777;
240
 
253
  // Make thumb and/or update metadata
254
  wp_update_attachment_metadata( (int) $_POST["ID"], wp_generate_attachment_metadata( (int) $_POST["ID"], $current_file ) );
255
 
256
+ // Update the attachment modified dates
257
+ emr_update_modified_dates( (int) $_POST["ID"] );
258
+
259
+ // Trigger possible updates on CDN and other plugins
260
  update_attached_file( (int) $_POST["ID"], $current_file);
261
  } elseif ( 'replace_and_search' == $replace_type && apply_filters( 'emr_enable_replace_and_search', true ) ) {
262
  // Replace file, replace file name, update meta data, replace links pointing to old file name
292
  "SELECT meta_value FROM $postmeta_table_name WHERE meta_key = '_wp_attached_file' AND post_id = %d;",
293
  (int) $_POST["ID"]
294
  );
295
+
296
  $old_meta_name = $wpdb->get_row($sql, ARRAY_A);
297
  $old_meta_name = $old_meta_name["meta_value"];
298
 
308
  $new_metadata = wp_generate_attachment_metadata( (int) $_POST["ID"], $new_file );
309
  wp_update_attachment_metadata( (int) $_POST["ID"], $new_metadata );
310
 
311
+ // Update the attachment modified dates
312
+ emr_update_modified_dates( (int) $_POST["ID"] );
313
+
314
  // Search-and-replace filename in post database
315
  $current_base_url = emr_get_match_url( $current_guid );
316
 
318
  "SELECT ID, post_content FROM $table_name WHERE post_status = 'publish' AND post_content LIKE %s;",
319
  '%' . $current_base_url . '%'
320
  );
321
+
322
+
323
  $rs = $wpdb->get_results( $sql, ARRAY_A );
324
 
325
  $number_of_updates = 0;
326
+
327
+
328
  if ( ! empty( $rs ) ) {
329
  $search_urls = emr_get_file_urls( $current_guid, $current_metadata );
330
  $replace_urls = emr_get_file_urls( $new_guid, $new_metadata );
331
  $replace_urls = emr_normalize_file_urls( $search_urls, $replace_urls );
332
 
333
+
334
  foreach ( $rs AS $rows ) {
335
+
336
  $number_of_updates = $number_of_updates + 1;
337
+
338
  // replace old URLs with new URLs.
339
  $post_content = $rows["post_content"];
340
  $post_content = addslashes( str_replace( $search_urls, $replace_urls, $post_content ) );
348
  }
349
  }
350
 
351
+ // Trigger possible updates on CDN and other plugins
352
  update_attached_file( (int) $_POST["ID"], $new_file );
353
  }
354
+
355
  #echo "Updated: " . $number_of_updates;
356
 
357
  $returnurl = admin_url("/post.php?post={$_POST["ID"]}&action=edit&message=1");
358
+
359
  // Execute hook actions - thanks rubious for the suggestion!
360
  if (isset($new_guid)) { do_action("enable-media-replace-upload-done", $new_guid, $current_guid); }
361
+
362
  } else {
363
  //TODO Better error handling when no file is selected.
364
  //For now just go back to media management