=== Enable Media Replace === Contributors: mungobbq Tags: admin, attachment, media, files Requires at least: 2.8 Tested up to: 3.0 Stable tag: trunk Enables replacing attachment files by simply uploading a new file in the media library edit view. == Description == 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! #### A real timesaver 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? Well, no longer! 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: #### It's simple to replace a file 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. 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. This plugin is very powerful and a must-have for any larger sites built with WordPress. #### Display file modification time 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. 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 #3) 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). == Changelog == = 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](http://www.fatcow.com) = 1.1 = * Minor bugfix, now working with IE8 too! = 1.0 = * First stable version of plugin. == Installation == Quick and easy installation: 1. Upload the folder `enable-media-replace` to the `/wp-content/plugins/` directory 1. Activate the plugin through the 'Plugins' menu in WordPress 1. Done! == Frequently Asked Questions == = What does this plugin actually do? = This plugin makes it easy to update/replace files that have been uploaded to the WordPress Media Library. = How does it work? = 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. == Screenshots == 1. The new link in the WordPress Edit Media view. 2. The upload window. 3. Get the file ID in the edit file URL == Wishlist / Coming attractons == Do you have suggestions? Feel free to contact me at mans@mansjonasson.se