[wp-hackers] Multiple category boxes / tabs in the Admin Area

Eduardo Wosiack Zulian eduardo at ethymos.com.br
Thu Apr 30 13:57:29 GMT 2009


I'll do it. Thanks a lot, Jennifer!

-- 
Eduardo

2009/4/29 Jennifer Hodgdon <yahgrp at poplarware.com>

> Ah, that's quite different. The meta_box() function lets you add separate
> boxes to the edit screen. If you want to modify a built-in box, the code
> that creates that built-in box would need to have an "action" hook call in
> it that would let plugins add to the box (assuming you don't want to hack
> core).
>
> It doesn't appear to me that the post_categories_meta_box() function in
> wp-admin/edit-form-advanced.php has such a hook right now, but if you file a
> bug on trac.wordpress.org with a patch that adds an action hook call, you
> can probably get it added to 2.8 (the WP Powers that Be are usually pretty
> receptive to these additions). Meanwhile, you can hack core by adding just
> that one line to the file, which isn't quite as bad as totally rewriting the
> function.
>
> Good luck!
>  --Jennifer
>
> ps: I don't know how familiar you are with WP "action" hooks... the line
> you would want to add to core WP is something like this:
>
> do_action( 'post_categories_meta_box' );
>
> And your plugin would have:
>
> add_action( 'post_categories_meta_box', 'myplugin_myfunctionname' );
> function myplugin_myfunctionname() {
>   //print out your addition to the box
> }
>
> Anyway, you could try this out, and if it works, file a Trac bug to get the
> do_action line added to core.
>
> Eduardo Wosiack Zulian wrote:
>
>> Almost there, Jennifer. Put each top-level category in its own box is an
>> idea. However, I was planning to maybe, if possible, to put these
>> categories
>> into the post_categories_meta_box, side by side with the "most used" tab.
>> Is
>> that possible, right?
>>
>
> --
> Jennifer Hodgdon * Poplar ProductivityWare
> www.poplarware.com
> Drupal, WordPress, and custom Web programming
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



-- 
Eduardo W. Zulian
Ethymos Soluções em Web
+55 41 3077-4163
www.ethymos.com.br
www.twitter.com/ethymos


More information about the wp-hackers mailing list