Version Description
- Tested with WP 4.7.2
- New PT translations (thanks Pedro Mendonca! https://github.com/mansj/enable-media-replace/commit/b6e63b9a8a3ae46b3a6664bd5bbf19b2beaf9d3f)
Download this release
Release Info
| Developer | MungoBBQ |
| Plugin | |
| Version | 3.0.6 |
| Comparing to | |
| See all releases | |
Code changes from version 3.0.5 to 3.0.6
- enable-media-replace.php +2 -5
- languages/enable-media-replace-pt_PT.mo +0 -0
- languages/enable-media-replace-pt_PT.po +70 -49
- popup.php +4 -5
- readme.txt +6 -2
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.0.
|
| 7 |
Author: Måns Jonasson
|
| 8 |
Author URI: http://www.mansjonasson.se
|
| 9 |
|
|
@@ -102,7 +102,7 @@ function add_media_action( $actions, $post) {
|
|
| 102 |
}
|
| 103 |
$link = "href=\"$editurl\"";
|
| 104 |
|
| 105 |
-
$newaction['adddata'] = '<a ' . $link . '
|
| 106 |
return array_merge($actions,$newaction);
|
| 107 |
}
|
| 108 |
|
|
@@ -158,6 +158,3 @@ function ua_admin_date_replaced_media_on_edit_media_screen() {
|
|
| 158 |
<?php
|
| 159 |
}
|
| 160 |
add_action( 'attachment_submitbox_misc_actions', 'ua_admin_date_replaced_media_on_edit_media_screen', 91 );
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
?>
|
| 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.0.6
|
| 7 |
Author: Måns Jonasson
|
| 8 |
Author URI: http://www.mansjonasson.se
|
| 9 |
|
| 102 |
}
|
| 103 |
$link = "href=\"$editurl\"";
|
| 104 |
|
| 105 |
+
$newaction['adddata'] = '<a ' . $link . ' aria-label="' . __("Replace media", "enable-media-replace") . '" rel="permalink">' . __("Replace media", "enable-media-replace") . '</a>';
|
| 106 |
return array_merge($actions,$newaction);
|
| 107 |
}
|
| 108 |
|
| 158 |
<?php
|
| 159 |
}
|
| 160 |
add_action( 'attachment_submitbox_misc_actions', 'ua_admin_date_replaced_media_on_edit_media_screen', 91 );
|
|
|
|
|
|
|
|
|
languages/enable-media-replace-pt_PT.mo
CHANGED
|
Binary file
|
languages/enable-media-replace-pt_PT.po
CHANGED
|
@@ -2,7 +2,7 @@ msgid ""
|
|
| 2 |
msgstr ""
|
| 3 |
"Project-Id-Version: enable-media-replace\n"
|
| 4 |
"Report-Msgid-Bugs-To: \n"
|
| 5 |
-
"POT-Creation-Date:
|
| 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"
|
|
@@ -11,93 +11,90 @@ msgstr ""
|
|
| 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:
|
| 15 |
-
"X-Generator: Poedit 1.8.
|
| 16 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
| 17 |
"X-Poedit-SourceCharset: UTF-8\n"
|
|
|
|
| 18 |
"X-Poedit-SearchPath-0: .\n"
|
| 19 |
-
"X-Poedit-SearchPath-1: ..\n"
|
| 20 |
|
| 21 |
-
#:
|
| 22 |
-
#:
|
| 23 |
msgid "Replace media"
|
| 24 |
-
msgstr "Substituir
|
| 25 |
|
| 26 |
-
#:
|
| 27 |
msgid "Upload a new file"
|
| 28 |
msgstr "Carregar novo ficheiro"
|
| 29 |
|
| 30 |
-
#:
|
| 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 |
-
#:
|
| 36 |
msgid "Revised"
|
| 37 |
msgstr "Revisto"
|
| 38 |
|
| 39 |
-
#:
|
| 40 |
msgid "You do not have permission to upload files."
|
| 41 |
msgstr "Não tem permissão para carregar ficheiros."
|
| 42 |
|
| 43 |
-
#:
|
| 44 |
msgid "Replace Media Upload"
|
| 45 |
-
msgstr "Carregar
|
| 46 |
|
| 47 |
-
#:
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
|
|
|
| 54 |
|
| 55 |
-
#:
|
| 56 |
msgid "Choose a file to upload from your computer"
|
| 57 |
msgstr "Escolher um ficheiro para carregar a partir do computador"
|
| 58 |
|
| 59 |
-
#:
|
| 60 |
msgid "Select media replacement type:"
|
| 61 |
-
msgstr "Seleccione o tipo de substituição de
|
| 62 |
|
| 63 |
-
#:
|
| 64 |
msgid "Just replace the file"
|
| 65 |
msgstr "Apenas substituir o ficheiro"
|
| 66 |
|
| 67 |
-
#:
|
| 68 |
-
|
| 69 |
-
msgstr "Nota: Esta opção requer o carregamento de um ficheiro do mesmo tipo ("
|
| 70 |
-
|
| 71 |
-
#: ../popup.php:58
|
| 72 |
msgid ""
|
| 73 |
-
"
|
| 74 |
-
"same ("
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
|
| 81 |
-
#:
|
| 82 |
msgid "Replace the file, use new file name and update all links"
|
| 83 |
msgstr ""
|
| 84 |
"Substituir o ficheiro, usar o novo nome de ficheiro e actualizar todas as "
|
| 85 |
"ligações"
|
| 86 |
|
| 87 |
-
#:
|
|
|
|
| 88 |
msgid ""
|
| 89 |
"Note: If you check this option, the name and type of the file you are about "
|
| 90 |
-
"to upload will replace the old file. All links pointing to the current file
|
|
|
|
| 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 ("
|
|
|
|
| 95 |
|
| 96 |
-
#:
|
| 97 |
-
msgid ") will be updated to point to the new file name."
|
| 98 |
-
msgstr ") serão actualizadas de forma a referenciar o novo nome de ficheiro."
|
| 99 |
-
|
| 100 |
-
#: ../popup.php:63
|
| 101 |
msgid ""
|
| 102 |
"Please note that if you upload a new image, only embeds/links of the "
|
| 103 |
"original size image will be replaced in your posts."
|
|
@@ -106,15 +103,15 @@ msgstr ""
|
|
| 106 |
"imagens incorporadas e ligações com o tamanho original serão substituídas "
|
| 107 |
"nos seus artigos."
|
| 108 |
|
| 109 |
-
#:
|
| 110 |
msgid "Upload"
|
| 111 |
msgstr "Carregar"
|
| 112 |
|
| 113 |
-
#:
|
| 114 |
msgid "Cancel"
|
| 115 |
msgstr "Cancelar"
|
| 116 |
|
| 117 |
-
#:
|
| 118 |
#, php-format
|
| 119 |
msgid ""
|
| 120 |
"The file %1$s can not be deleted by the web server, most likely because the "
|
|
@@ -123,8 +120,32 @@ msgstr ""
|
|
| 123 |
"O ficheiro %1$s não pode ser apagado pelo servidor web, provavelmente porque "
|
| 124 |
"as permissões do ficheiro estão incorrectas."
|
| 125 |
|
| 126 |
-
#:
|
| 127 |
msgid "File type does not meet security guidelines. Try another."
|
| 128 |
msgstr ""
|
| 129 |
"O tipo de ficheiro não está de acordo com os padrões de segurança. Tente "
|
| 130 |
"outro."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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"
|
| 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."
|
| 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 "
|
| 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"
|
popup.php
CHANGED
|
@@ -26,8 +26,7 @@ $current_filename = substr($current_filename, (strrpos($current_filename, "/") +
|
|
| 26 |
|
| 27 |
?>
|
| 28 |
<div class="wrap">
|
| 29 |
-
|
| 30 |
-
<h2><?php echo __("Replace Media Upload", "enable-media-replace"); ?></h2>
|
| 31 |
|
| 32 |
<?php
|
| 33 |
$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"]);
|
|
@@ -43,7 +42,7 @@ $current_filename = substr($current_filename, (strrpos($current_filename, "/") +
|
|
| 43 |
#wp_nonce_field('enable-media-replace');
|
| 44 |
?>
|
| 45 |
<input type="hidden" name="ID" value="<?php echo (int) $_GET["attachment_id"]; ?>" />
|
| 46 |
-
<div id="message" class="updated
|
| 47 |
|
| 48 |
<p><?php echo __("Choose a file to upload from your computer", "enable-media-replace"); ?></p>
|
| 49 |
|
|
@@ -55,11 +54,11 @@ $current_filename = substr($current_filename, (strrpos($current_filename, "/") +
|
|
| 55 |
<p><?php echo __("Select media replacement type:", "enable-media-replace"); ?></p>
|
| 56 |
|
| 57 |
<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>
|
| 58 |
-
<p class="howto"><?php
|
| 59 |
|
| 60 |
<?php if ( apply_filters( 'emr_enable_replace_and_search', true ) ) : ?>
|
| 61 |
<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>
|
| 62 |
-
<p class="howto"><?php
|
| 63 |
<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>
|
| 64 |
<?php endif; ?>
|
| 65 |
<?php else : ?>
|
| 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"]);
|
| 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 |
|
| 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 : ?>
|
readme.txt
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
=== Enable Media Replace ===
|
| 2 |
Contributors: mungobbq
|
| 3 |
Tags: admin, attachment, media, files
|
| 4 |
-
Requires at least:
|
| 5 |
-
Tested up to: 4.
|
| 6 |
Stable tag: trunk
|
| 7 |
|
| 8 |
Enables replacing attachment files by simply uploading a new file in the media library edit view.
|
|
@@ -37,6 +37,10 @@ If you want more control over the format used to display the time, you can use t
|
|
| 37 |
|
| 38 |
== Changelog ==
|
| 39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
= 3.0.5 =
|
| 41 |
* Tested with WP 4.6.1
|
| 42 |
|
| 1 |
=== Enable Media Replace ===
|
| 2 |
Contributors: mungobbq
|
| 3 |
Tags: admin, attachment, media, files
|
| 4 |
+
Requires at least: 4.0
|
| 5 |
+
Tested up to: 4.7.2
|
| 6 |
Stable tag: trunk
|
| 7 |
|
| 8 |
Enables replacing attachment files by simply uploading a new file in the media library edit view.
|
| 37 |
|
| 38 |
== Changelog ==
|
| 39 |
|
| 40 |
+
= 3.0.6 =
|
| 41 |
+
* Tested with WP 4.7.2
|
| 42 |
+
* New PT translations (thanks Pedro Mendonca! https://github.com/mansj/enable-media-replace/commit/b6e63b9a8a3ae46b3a6664bd5bbf19b2beaf9d3f)
|
| 43 |
+
|
| 44 |
= 3.0.5 =
|
| 45 |
* Tested with WP 4.6.1
|
| 46 |
|
