-
Disallow File Uploads over 2Mb (or any size)
A quick and easy jQuery snippet to find all file upload inputs & make sure users don’t upload files that are too large. Just include in your $(function(){ }); function $(‘input[type=file]’).each(function(){ $(this).on(‘change’, function() { //this.files[0].size gets the size of your file. if (this.files[0].size > 2097152 || this.files[0].filesize > 2097152) { alert(‘Your file is too large…
-
WordPress Import Posts – Assign to Existing Author
When importing posts, pages, or custom posts from an existing WordPress installation, it asks you whether you want to import a user, assign to a new user, or assign to an existing user. If you have already imported users, you want to assign all posts to existing users. However, if you have a lot of…