WordPress.org

Ready to get started?Download WordPress

Forums

BackUpWordPress
backupwordpress clobbers upload_mimes() filter (4 posts)

  1. halifaxious
    Member
    Posted 2 years ago #

    When using BUWP 1.6.6 and WP3.3.1, this function in my functions.php file has no effect:

    add_filter('upload_mimes', 'custom_upload_mimes'); 
    
    function custom_upload_mimes ( $existing_mimes=array() ) {
      $existing_mimes['wif'] = 'text/plain';
      return $existing_mimes;
    }

    Since it works when I deactivate BUWP, I can only suppose that BUWP is removing the filter. Why would it need to do that and how can I make it stop?

    http://wordpress.org/extend/plugins/backupwordpress/

  2. Tom Willmot
    Human Made
    Plugin Author

    Posted 2 years ago #

    Hi halifaxious

    BackUpWordPress doesn't interact with the upload_mimes filter at all, so I'm don't think it's that, can you reproduce the issue on a fresh install of wordpress with the default theme and no other plugins?

  3. dpacmittal
    Member
    Posted 2 years ago #

    Backupwordpress does break 'upload_mimes' functionality.

    See: http://core.trac.wordpress.org/ticket/21299

    Your plugin calls the function sanitize_file_names() which calls get_allowed_mime_types() too early.

  4. Tom Willmot
    Human Made
    Plugin Author

    Posted 2 years ago #

    Nice spot, I'll get that fixed in the next version.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic