[wp-hackers] Customizing the view of custom taxonomies

Scott Bressler sbressler at gmail.com
Sat Aug 21 23:48:21 UTC 2010

Thanks to all for your help with this, particularly for the code fragment,
Mike. I'll be specific about my eventual solution in case it might help
someone else down the road.

The key filter I needed and ended up using was
pre_{$my_taxonomy}_description (where description was the specific field I
wanted to edit in the term). The generic hook is: pre_{$taxonomy}_{$field},
which is applied in sanitize_term_field.

The logic in my method was as follows:

function custom_term_description_sanitization( $description ) {
    if ( !empty( $_POST ) && !empty( $_POST[__my_form_input_name__] ) )
        return $_POST[__my_form_input_name__];
        return $description;

Thanks again, and hopefully this might help someone in the future trying to
customize the taxonomy UI.


On Mon, Aug 2, 2010 at 11:33 AM, Jeremy Clarke <jer at simianuprising.com>wrote:

> On Sun, Aug 1, 2010 at 2:30 PM, Scott Bressler <sbressler at gmail.com>
> wrote:
> > The drop-down is indeed for editing the available terms themselves. When
> > one
> > adds a "copy editor" term to the taxonomy, they will pick that this is of
> > type "user." Then, there will of course also be a drop-down in the
> metabox
> > itself for choosing a user. If one were to make a "due date" term, they
> > would choose "date" as the type when editing the taxonomy. Then in the
> > metabox there would be a date selector.
> >
> I think your needs require different solutions for each feature, and you
> are
> probably over-estimating the value of taxonomies to solve them.
> Your user-related setting about copy editor needs so much special stuff
> that
> it should probably not use taxonomies. Try doing it with custom fields, I
> don't think it will be harder than using taxonomies.
> Your due date stuff also does not seem like it needs to be taxonomy-based.
> Have you looked around at the existing editorial workflow plugins? I think
> there are some that solve these problems already.
> http://wordpress.org/extend/plugins/search.php?q=editorial
> --
> Jeremy Clarke | http://jeremyclarke.org
> Code and Design | http://globalvoicesonline.org
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list