Removing Inline Upload From WordPress

Sep 25, 2006

Here's a handy tip for all you WordPress 2.x users out there. The inline uploading feature of the "Write Post" administration page was completely useless to me. I never have, nor will I ever, upload files to my web server using the WordPress interface (that's what we have SCP and SFTP for). What irritated me most, however, was that I couldn't turn this feature off, thereby hiding the iframe that contained the uploading controls. It took up a large amount of space on the admin page, and it looked ugly. But I've figured out how to "disable" it. Here's what I did:

In the wp-admin/ folder, I opened up the file named edit-form-advanced.php. Doing a search for the word upload yielded a block of code controlled by the following conditional expression:

if(current_user_can('upload_files'))

I simply commented out this block (including the conditional) with some c-style comments. I did the exact same thing for the edit-page-form.php file. VoilĂ : no more inline upload! I'm so glad I've been able to reclaim that wasted screen real estate.

1 Comment

John

1:50 AM on Oct 12, 2006
Thank you 100 times over! Having that stupid thing gone is wonderful!

Leave a Comment

Ignore this field:
Never displayed
Leave this blank:
Optional; will not be indexed
Ignore this field:
Both Markdown and a limited set of HTML tags are supported
Leave this empty: