WordPress.org

Support

Support » Plugins and Hacks » Enable Media Replace » Feature Request: Limit what types can be replaced

Feature Request: Limit what types can be replaced

  • Howdy 😀

    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.

    thoughts?

    http://wordpress.org/extend/plugins/enable-media-replace/

  • The topic ‘Feature Request: Limit what types can be replaced’ is closed to new replies.
Skip to toolbar