Enable Media Replace

Descrição

A free, lightweight and easy to use plugin that allows you to seamlessly replace an image or file in your Media Library by uploading a new file in its place. No more deleting, renaming and re-uploading files!
Supported by the friendly team that created ShortPixel 🙂

Poupa muito tempo

Não lhe parece complicado ter primeiro de eliminar um ficheiro e depois carregar um novo com o exacto mesmo nome, sempre que pretende actualizar uma imagem ou qualquer outro ficheiro carregado dentro da biblioteca multimédia WordPress?

Pois bem, nunca mais!

Agora será possível substituir qualquer ficheiro já existente através da opção ‘Editar multimédia’. A substituição de ficheiros poderá ser feita escolhendo uma das duas formas possíveis:

É simples substituir um ficheiro

  1. Apenas substituir o ficheiro. Esta opção exige que carregue um ficheiro do mesmo tipo do ficheiro que será substituído. O nome do anexo ficará o mesmo independentemente do nome do ficheiro que for carregado.
  2. Substitua o ficheiro, use um novo nome e atualize todas as ligações. Se escolher esta opção, o nome e o tipo do ficheiro que está prestes a carregar irá substituir o ficheiro antigo. Todas as ligações que apontavam para o ficheiro antigo serão atualizadas e apontarão ao novo ficheiro.

This plugin is very powerful and a must-have for any larger sites built with WordPress. It now also comes with preview of the replaced image!

Exibir a data de modificação do ficheiro

There is a shortcode available which picks up the file modification date and displays it in a post or a page. The code is:
[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.

Assim [file_modified id=870] iria mostrar a última hora em que o ficheiro com o ID 870 foi carregado para o seu site. Para obter o ID de um ficheiro, verifique o URL quando estiver a editar um ficheiro na biblioteca multimédia (consulte o ecrã #4)

Caso pretenda obter mais controlo sobre o formato utilizado para visualizar a hora e data, poderá utilizar a opção ‘format’, pelo que [file_modified id=870 format=Y-m-d] iria mostrar a data de modificação do ficheiro mas não a hora. O formato da string usa as tags normais de formatação de data e hora PHP date().

Compatible and recommended Plugins =

  • ShortPixel Image Optimization – Enable Media Replace is fully compatible with this plugin. Once enabled, ShortPixel will automatically optimize the images you replace using Enable Media Replace.
  • Resize Image After Upload plugin – automatically resize images upon upload to save traffic & disk space. Good for SEO and compatible with EMR.
  • Regenerate Thumbnails Advanced – Fast, free and simple to use plugin to regenerate the thumbnails for your site after changing a theme (for example). Supported & maintained by ShortPixel

Wishlist / Coming attractions

Do you have suggestions? Feel free to contact ShortPixel here

Ecrãs

  • A nova ligação na biblioteca multimédia.
  • O botão substituir multimédia tal como apresentado na vista "Editar multimédia".
  • As opções de carregamento
  • Obter o ID do ficheiro a partir do URL

Instalação

Instalação rápida e fácil:

  1. Carregue a pasta enable-media-replace para o seu diretório de plugins
  2. Ative o plugin ateavés do menu ‘Plugins’ na área de administração do WordPress
  3. Concluído!

Perguntas frequentes

Installation Instructions

Instalação rápida e fácil:

  1. Carregue a pasta enable-media-replace para o seu diretório de plugins
  2. Ative o plugin ateavés do menu ‘Plugins’ na área de administração do WordPress
  3. Concluído!
O que faz este plugin exactamente?

Este plugin torna mais fácil a substituição de ficheiros que já existam na biblioteca multimédia do WordPress.

Como funciona?

Uma nova opção ficará disponível na vista de edição de multimédia, chamada “Substituir multimédia”. Será ali que deverá carregar um novo ficheiro para substituir o antigo.

Substituí um ficheiro mas não foi alterado!

Existem duas principais razões para que isto possa ocorrer.

Em primeiro lugar, certifique-se de que não estará a visualizar uma versão do ficheiro guardada na cache do navegador, especialmente se estiver a substituir uma imagem. Clique em “Recarregar” no seu navegador para ter certeza.

Em segundo lugar, se o ficheiro parece mesmo inalterado, verifique se o WordPress tem permissões de gravação na pasta de carregamentos. Se efetuou alterações à instalação do WordPress (provavelmente durante uma mudança de servidor), as permissões dos ficheiros carregados poderão ter sido redefinidas pelo que o WordPress poderá ficar sem permissões para conseguir efetuar alterações aos ficheiros. Caso não saiba como fazer isto, entre em contacto com os serviços de alojamento do seu servidor.

Avaliações

very good!

it does exactly what it should, works well, is easy to use and takes away all the headaches when you have to replace the same images again and again!

True plugin

Excellent! This plugin give a chance correct replace image without SQL database edit.

A real time saver, plus excellent support!

Each week I have to change between 25 and 30 images, this plugin makes the job incredibly easy and fast. When I did have a problem and asked for help, the response was very fast and fixed the problem on the first try.

More trouble than it was worth

Replaced images didn’t show up properly. I deactivated the plugin, and images stopped showing on my pages, posts, and in my media library.

In half the time it took me to research and implement a fix, I could have replaced the images manually.

Works as expected

This plugin does what it says.
The 2 different options are very useful :
– only replace the file and keep the same name
– replace the file by a new file with a different name AND update all links to point to this new file

Perfect time saver

Ler todas as 178 avaliações

Contribuidores e programadores

“Enable Media Replace” é software de código aberto. As seguintes pessoas contribuíram para este plugin:

Contribuidores

“Enable Media Replace” foi traduzido para 21 locales. Obrigado aos tradutores pelas suas contribuições.

Traduza o “Enable Media Replace” para o seu idioma.

Interessado no desenvolvimento?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Registo de alterações

3.2.7

  • Add minimum required php version to run the plugin.
  • Security: Prevent direct access to php files.
  • Security: Prevent direct access to directories.
  • Security: Escape translation strings using esc_attr__() and esc_html__() functions.
  • Fix RTL issues.

3.2.6

  • no more 404 error if no image was selected when trying to replace it
  • added preview so you can check the image being replaced and also the image that’s being replaced with
  • .dat files can be replaced (functionality accidentally removed in the previous version)
  • added compatibility with S3 upload plugin
  • when an image is replaced the date is also updated

3.2.5

  • remove the leftover setcookie and the plugins recommendations.

3.2.4

  • Fix PDF thumbnails not replaced when replacing a PDF
  • Fix not replacing text files with .dat extension

3.2.3

  • disable ShortPixel recommendation on secondary sites of a multisite install when it was network activated.

3.2.2

  • Fixed compatibility with ShortPixel and Resize Image After Upload
  • Added ShortPixel links and images, fixed the problem of ShortPixel recommendation not dismissing.

3.2.1

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

3.2

  • Tested with WP 4.9.4
  • Added Shortpixel link in replace media screen

3.1.1

  • Fixed bug introduced in an earlier version, preventing the updating of URLs on pages/posts if the link did not contain the domain name

3.1

  • Got rid of some pesky old code, and added some better filtering options, thanks to GitHub users speerface, aaemnnosttv, and ururk
  • Brand new, shiny code to replace other image sizes in embedded media, thanks to GitHub user ianmjones!
  • Tested with WP 4.8

3.0.6

  • Tested with WP 4.7.2
  • New PT translations (thanks Pedro Mendonca! https://github.com/mansj/enable-media-replace/commit/b6e63b9a8a3ae46b3a6664bd5bbf19b2beaf9d3f)

3.0.5

  • Tested with WP 4.6.1

3.0.4

  • Fixed typo in .pt translations (https://github.com/mansj/enable-media-replace/pull/18)
  • Fixed better error handling in modification date functions (https://github.com/mansj/enable-media-replace/pull/16)
  • Tested with WP 4.4.1

3.0.3

  • Scrapped old method of detecting media screen, button to replace media will now show up in more places, yay!
  • Made sure the call to get_attached_file() no longer skips filters, in response to several users wishes.
  • Suppressed error messages on chmod()
  • Added Japanese translation (Thank you, chacomv!)

3.0.2

  • Cleaned up language files
  • Added Portuguese translation (Thanks pedro-mendonca!)
  • Tested with WP 4.1
  • Added missing Swedish translation strings

3.0.1

  • Tiny fix to re-insert the EMR link in the media list view.

3.0

  • Updated for WordPress 4.0
  • Now inheriting permissions of the replaced files, Thank you Fiwad

2.9.7RC1

2.9.6

  • Added fix by Grant K Norwood to address a possible security problem in SQL statements. Thanks Grant!
  • Created GitHub repo for this plugin, please feel free to contribute at github.com/mansj/enable-media-replace

2.9.5

  • Bug fix for the short code displaying the modification date of a file
  • Updated all database queries in preparation for WP 3.9

2.9.4

  • Bug fix for timezone changes in WordPress
  • Minor UI change to inform the user about what actually happens when replacing an image and using a new file name

2.9.3

  • Added call to update_attached_file() which should purge changed files for various CDN and cache plugs. Thanks Dylan Barlett for the suggestion! (https://wordpress.org/support/topic/compatibility-with-w3-total-cache)
  • Suppressed possible error in new hook added in 2.9.2

2.9.2

  • Small bug fix
  • Added hook for developers to enable purging possible CDN when updating files – thanks rubious for the suggestion!

2.9.1

  • Added Brazilian Portuguese translation, thanks Roger Nobrega!
  • Added filter hook for file name creation, thanks to Jonas Lundman for the code!
  • Added modification date to the edit attachment screen, thanks to Jonas Lundman for the code!
  • Enhanced the deletion method for old file/image thumbnails to never give unnecessary error messages and more accurately delete orphaned thumbs

2.9

  • Added Portuguese translation, thanks Bruno Miguel Bras Silva!
  • New edit link from media library
  • After uploading, the plugin now takes you back to edit screen instead of library

2.8.2

  • 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!
  • Added a new, supposedly better Russian translation from “Vlad”.

2.8.1

  • Fixed a small bug which could create error messages on some systems when deleting old image files.

2.8

  • New and safer method for deleting thumbnails when a new image file is uploaded.
  • New translations for simplified Chinese (thanks Tunghsiao Liu) and Italian (grazie Marco Chiesi)
  • Added method for detecting upload screen to ensure backward compatibility with versions pre 3.5

2.7

  • A couple of changes made to ensure compatibility with WordPress 3.5. Thanks to Elizabeth Powell for the fixes!

2.6

  • 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.

2.5.2

  • 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!

2.5.1

  • 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.
  • New translation to Danish – thanks to Michael Bering Petersen!

2.5

  • Tested with WordPress 3.2.1
  • New translation to German – thanks to Martin Lettner!
  • New translation to French – thanks to François Collette!

2.4.1

  • Bug fix for WordPress 3.1 RC. Now properly tested and should be working with 3.1 whenever it finally comes out. 🙂

2.4

  • Bug fixes, security fixes. Thanks to my old pal Ulf “Årsta” Härnhammar for pointing them out!
  • New method for uploading avoids going around WP, for greater security.

2.3

  • Lots of code trimmed and enhanced, thanks to Ben ter Stal! Now working properly with Windows systems, better security, optimized loading, and much more.
  • Added Dutch translation by Ben ter Stal.

2.2

  • Bug fix, fixed typo in popup.php, thanks to Bill Dennen and others for pointing this out!

2.1

  • New shortcode – display file modification date on your site (see description for more info)
  • A couple of bug fixes for final release of 3.0 – Thanks to Jim Isaacs for pointing them out!

2.0.1

  • Added support for SSL admin

2.0

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

1.4.1

  • Tested with WordPress 3.0 beta 2

1.4

  • Removed short tags for better compatibility.

1.3

  • Added support for wp_config setting “FORCE_SSL_ADMIN”

1.2

  • Added Russian translation, thanks to Fat Cower.

1.1

  • Minor bugfix, now working with IE8 too!

1.0

  • First stable version of plugin.