[wp-hackers] Possible to remove elements of 2.5 admin?

Jeremy Clarke jer-wphackers at simianuprising.com
Sat May 10 16:55:31 GMT 2008

I'm trying to fix a bug in this plugin http://beyn.org/sidecat/ (moves
category selector into sidebar, necessary for people like me with
hundreds of categories) that is caused by the fact that the original
category selector is still there in the html but just hidden with CSS
(you can't remove categories because the hidden original one keeps
them silently checked, also causes bigger page size and slower load
for unnecessarily because of duplicate lists).

At first I thought it would be easy, I could just remove the category
meta box with something like remove_meta_box(), as it is just another
meta box. Of course I realized there's no remove_meta_box() function,
so I loaded the $wp_meta_boxes array to try and remove it manually,
only to find it's not even in there, but instead hardcoded into the
editor template.

So, is there some other way to remove the categories box (and the
other default boxes)? It seems to me that they should all work with
the meta_box api so that people who add replacements can quickly
remove the originals (just like the wonderful widgets api which works
that way).

I realize that I could do it in a hundred other ways (filter the
category list on only that situation etc), but really what I need is
to just properly turn off the box itself. It would also be useful in a
hundred other plugin situations related to moving/altering/replacing
metabox functionality.

Is this something that would get into core if there was a patch (or
many patches to get everything into the game)?

Jeremy Clarke
Code and Design | globalvoicesonline.org

More information about the wp-hackers mailing list