[wp-hackers] On slug change, do something
nl at thoughtrefinery.com
Tue Jul 30 22:12:41 UTC 2013
Here's a Gist that'll do what you want using the 2 actions fired before and after a term slug is updated.
I had to use a global variable, but it works for all taxonomies (and a transient seems like overkill for this). I'm open to suggestions for improvement.
If you just wanted to do a single taxonomy, you could use this one hook version that exploits the fact that the slug change doesn’t immediately update the object cache, so we can compare the cached version to the database:
More information about the wp-hackers