Hack the source or make it a plugin?


I mentioned adding a line to the CSS for the WP Tiger Admin to get rid of scrollbars in the categories list on the Write Post page. I didn’t mention a couple other additions I made – one being the addition of a rule to hide the new inline file upload feature in WP 2.0.

The file uploader is housed in a iframe on the Write Post page. WordPress suggests it is pluggable to point of being replaced entirely. I’ve never used the upload functionality before so I haven’t taken enough of a look at in its new format to see what can all be done (or if anything really should be done). The little bit I did see wasn’t pretty so I hid it (though I’d really like to see it get the same treatment as the other advanced editing options, e.g. Custom Fields) by adding #uploading {display:none;} directly to the CSS file.

My hack isn’t very friendly. On the next update of Word Press or WP Tiger Admin, I would have to adopt that old code. More importantly, if I ever needed that file upload functionality, I’d need to request the inline upload URL directly as it wouldn’t be available anywhere in my admin panel. That, or remove the rule from my CSS. So today I wrapped that one line of CSS into a function and created a plugin out of it. It seems like a rather trivial plugin, but the WP plugin architecture is really where this modification belongs. This way I can just deactivate the plugin on the occasion that I need to use the uploader. And if I update anything, the plugin is easy to bring along.

So by that thinking should the line of CSS to fix the scrollbars also be a plugin? I’d say no. Maybe that is being inconsistent, but that line doesn’t change anything functionally and just feels more at home with the rest of the style rules. Additionally, the hide inline upload plugin could evolve from simply hiding it to enhancing it.

Get the plugin here.


  1. matches 20060109

    While I’m all about plugins, I’m also all about doing something in the most straightforward way possible (as evidenced by my hacking around WP 2.0 already). It’s almost absurdly nerdish to take your aforementioned 1 line of CSS and write an entire WordPress plugin around it rather than just throw it at the end of the CSS of the other plugin that you’re already using.


  2. waytoocrowded 20060109

    It seems more straightforward to deactivate a plugin called Hide Inline Uploader in the event I want to upload something through the admin than to deactivate a plugin called WP Tiger Admin (and deactivate my entire user interface in the process). Or to activate a plugin called Hide Inline Uploader in the event of an update than to tack a line of CSS onto a file in another plugin.

    I guess I’m all about the better documentation of what a file is doing.

  3. matches 20060110

    You make a good point – I hadn’t considered that you might want to be able to turn the image uploader on at some point, in which case it certainly makes sense to make it accessible in the admin.

    With that knowledge I retract my previous statement.

Skateboards and bikes are better at nights

Skateboards and bikes are better at nights. 0 comments.

Search WayTooCrowded
The Header Should Always Point Home