Enable Media Replace
Feature Request: Limit what types can be replaced (1 post)

  1. Howdy :D

    I was wondering what you thought about adding a filter somewhere that lets us modify while file types can be replaced using your plugin.

    For example, I want to let our users replace text / word / pdf files, but not any kind of images or anything. I don't think it would be too much work, really.

    wp_check_filetype_and_ext already accepts an optional array of allowed types, so maybe something like:

    $allowed_types = apply_filters('emr_replacable_mime_types', get_allowed_mime_types());

    Then pass that in as the 3rd parameter to wp_check_filetypes_and_ext.

    To take it one step further, I think you'd just want to do a similar check on the attachment page to help you decide if you even show the Replace link or not.



Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Enable Media Replace
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by Jason Lemahieu (MadtownLems)
  • This topic is not resolved
  • WordPress version: 3.0.4


No tags yet.