Allow JSON file uploads in WordPress Media Library

Allow Json File Uploads In Wordpress Media Library Image

Whoa! Check out this fun lil piggy. Just a couple simple lines and you can upload JSON files to your WordPress site! Hotdamn.

What it does…

Allows JSON files to be uploaded in the WordPress Media Library.

How it does it…

Hooks into `upload_mimes` and adds `application/json` as a valid/allowed mime type. I use this set to admin

Use the JSON file for easily importing into your CodeSnippetsPro plugin. Use the PHP file or just copy/paste the code sample into your functions.php if you’re not using CodeSnippetsPro.

Related Snips

Leave a Reply

Your email address will not be published. Required fields are marked *