1
votes

I'm using Wordpress 4.1 ver.

Detected the following bug: Unable to update taxonomy terms with same slugs & names.

In post Category I create term 'foo'. Then in post Tags I also create term 'foo'. After that I try to edit Tag 'foo' (for example it's name) and save it. Wordpress outputs a message: 'Item not updated'. So I can't update the Tag term 'foo'.

So I'd like to know is there any hook to replace taxonomy term updating with my own function? I mean this for edit taxonomy admin menu page.

Thanks in advance.

1
Did you check the 'wp_terms' table? By what name are the category and the tag saved there? - Nadeem Khan
Both "names" and "slugs" are saved with same names. - Ksenia

1 Answers

3
votes

As per wp-includes/taxonomy.php. The edit related action for a term is:

do_action( "edited_term", $term_id, $tt_id, $taxonomy );

You can use this hook in your own function and update the term you want to update using its $term_id.