Hi,
I'm looking for a hook to lauch a function when someone adds or edit a term in a custom taxonomy.
edit_term_taxonomy works when you edit a term
What about creating a new term ?
Utkarsh Kukreti answers:
'create_term' hook.
Utkarsh Kukreti comments:
http://adambrown.info/p/wp_hooks/hook/create_term?version=3.2&file=wp-includes/taxonomy.php
gmajoulet comments:
Doesn't work when I add a new term from the quick add term, on the taxonomy page
John Cotton answers:
Do you mean so you can add fields to the edit page?
{taxonomy_name}_edit_form_fields
On save edit_term or created_term (depending on whether it's new...) is fired.
Julio Potier answers:
<strong>"create_$taxonomy"</strong> hook if you use a custom taxo like you said
and
<strong>"created_$taxonomy"</strong> hook, same but AFTER creation.
Here the doc :
<blockquote> * @uses do_action() Calls 'create_term' hook with the term id and taxonomy id as parameters.
* @uses do_action() Calls 'create_$taxonomy' hook with term id and taxonomy id as parameters.
* @uses do_action() Calls 'created_term' hook with the term id and taxonomy id as parameters.
* @uses do_action() Calls 'created_$taxonomy' hook with term id and taxonomy id as parameters. </blockquote>
Hope it helps