This filter only accepts strings for mime types. It also already has support for webm, mp4, mpeg, ogv, and ogg.
I think you can remove everything except the line for SVGs.
A word of warning, WordPress doesn’t support SVG upload by default because it’s a security concern. Be careful about enabling this. At the least, use something like the Safe SVG plugin to help mitigate the risk.
Related Posts:
- Filter causing loss of _wp_attachment_metadata
- Filter Media by attached page or blog post in Library
- How can I add an Author filter to the Media Library?
- Filter media library items by size
- Limit Media Library to Given Folder
- Change upload directory on custom plugin page
- WP Rest API – Upload media without saving attachment post
- Disable resizing of gif when uploaded
- Can I add custom meta for each image uploaded via media-upload.php?
- Ignore a filter on the media library
- Change text of Description in Image Library
- WordPress 3.5+ upload tool filter
- How to check if “media_send_to_editor” is audio?
- Ignore dots when searching in the media library?
- Pass parameter to the upload_dir filter
- Changing image URLs in media library
- Allow EPS file upload – two EPS files have different MIME types
- Move a file from a directory to another
- Filter Media by Featured on Admin
- How add a group by to the query used by the media library?
- Using wp_handle_upload() to Direct Specific Path by Using $overrides
- upload_files cap to not loggen in users – add_cap to not logged in users
- wp_upload_bits Upload Specific Sizes Only
- Redirect to another page using contact form 7? [closed]
- Media upload default title from file name
- Possible to hook into Media Library preview File column and use a custom image?
- Create a pre-filtered version of the Media Library
- How to add custom media library mime icons?
- How to add HTML into error message
- Show uploaded pdf files dynamically and filter by month name
- Overriding Generated Attachment Post URL
- Code restricted to dashboard, running unexpectedly in the frontend (pre_get_post and admin-ajax.php)
- How to get to the date of the uploaded file
- Post Type Upload Directory – {post_type}_upload_dir filter
- This code works, but breaks the media uploader. How do I integrate it in a way that won’t?
- wp_headers vs send_headers. When to use each?
- Filter any HTTP request URI?
- Where to hook into post content?
- Remove “Insert from URL” link in Media upload – WP 3.5
- What hook do I use to edit the post statuses option in admin?
- Hide custom image sizes from media library
- Check if a filter or function has been already been called
- Password protect some uploaded files, so only logged-in users can view them
- Change URLs for static content
- How to change Woocommerce breadcrumbs content?
- I’m using a filter to remove the tags auto wrap, but there still wrapped elements?
- Cron schedule interval through plugin options?
- wpmu_signup_user_notification filter not working
- How to check a filter are applied
- How do I add a listbox to the TinyMCE editor?
- How to remove google font in WordPress for only single page?
- Why anything done on comments_array hook gets reset?
- get_header and hook avoid normal call
- Dropdown filter in custom posts
- How to add a download link to a movie from WP media library?
- How to order by taxonomy using wp_query
- Feed, RSS not able to clear the cache and cannot change the limit of cache life time
- Add Image Size for one Media Category Only
- WP action/filter to modify title before header output and article output?
- Custom view counts not updating correctly
- To add a custom filter based on a meta field
- Add media library items to Menus using the Customizer (via Media Manager not URL)
- How to create Woocommerce Product Filter Widget [closed]
- Add default user field to WooCommerce checkout [closed]
- What is the alternative to “ when it comes to calling Media (image) files in the ‘attachment.php’ file?
- Filtering Comment Reply Links (comment_reply_link_args) for “infinite replies” in nested comments
- Client system for media review?
- How To Watermark Audio
- Can I override the content array using the_posts filter?
- How to use do_shortcode_tag to modify the output of a shortcode?
- Changing the argument of a function
- Alter existing page contents based on url
- How to include add_filter() in a condition based on $post data
- Admin: how to make a custom list filter button send GET queryvars
- get_attached_file returns wrong path after changing media upload dir
- Is this hook really deprecated? ( manage_{$taxonomy}_custom_column )
- Media attachment date and post date
- Change image data durgin upload
- The gettext hook doesnt work on text with links
- Cannot create new posts or upload images using media manager
- “The editor has encountered an unexpected error” After add defer tag to java script
- Create different flavours of excerpt
- Is it possible to assign a css id to a row in plugins list table?
- Search with filters
- Media Library: Remove replace images of selected author
- Dealing with the clickTrack event in wp-playlist.js in order to display audio download link on the playlist title row
- How to upload multiple images using WP rest API to media?
- How do I isolate the reason a wordpress filter is not running?
- Change url to posts if they have custom tax only
- Publish button inside custom field group
- Customize register form page with add_action or apply_filter
- wordpress 3.6 media manager cropping timestamp
- Automatically adding images to a certain page through the Media Uploader
- How to separate a specific page’s comments from other comments
- str_replace css meta tag?
- Can you call a filter hook by “add_action”?
- Why isn’t this add_filter function working as expected?
- What does WordPress media uploader do to image files on upload?
- Upload to a specific media folder created by FileBird Lite
- Adding filter to the Contact Form 7 response