[wp-trac] [WordPress Trac] #11191: Add new action: add_tag_form_fields to edit-tags.php
WordPress Trac
wp-trac at lists.automattic.com
Thu Jan 28 14:13:09 UTC 2010
#11191: Add new action: add_tag_form_fields to edit-tags.php
--------------------------+-------------------------------------------------
Reporter: gcorne | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: General | Version: 2.9
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
Comment(by gcorne):
Use Case:
I have created a plugin that does two things: (1) allows slug for a term
to be managed, and (2) allows a landing page to specified that overrides
the wordpress-taxonomy page. The use case for the second feature is not
as common as the first, essentially by sending the wordpress to an actual
page, there are more options for integrating other content with the
listing of posts in a given term.
The hooks to make it work are below. Note: that that if you are simply
adding args to wp_insert_term and wp_update_term you just have to
carefully name your fields because $_POST is passed along.
//create the form elements
add_action('add_tag_form_fields', 'bu_taxonomy_term_fields', 1, 1);
add_action('edit_tag_form_fields', 'bu_taxonomy_term_fields', 1, 1);
//save the data
add_action('created_' . $tax->name, 'bu_term_saved', 1, 2);
add_action('edited_' . $tax->name, 'bu_term_saved', 1, 2);
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11191#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list