change permalink when title changes
Is there a simple way to detect when the title or another field of a record changes and have the permalink also updated?
I have a custom plugin that adds the category label to the permalink so when either the title or category changes, I want the permalink to update without needing to clear it manually.
Secondly the update permalink table command does not take the category into account. How can I link my plugin to the update table permalink?
Thanks for posting your update!
Another similar idea would be to use the record_presave hook to check to see if a field has been changed and similarly empty the permalink from the $_REQUEST array. Since the record_presave hook provides the old record's data (new data is in $_REQUEST), it would be relatively simple to compare the new and old values. There's an example included in the Permalinks readme.txt for creating custom permalink formats with a plugin - this should have most of the info required to set this up.
I'll note that we do have "category:label" support in the works for an upcoming release of the Permalinks plugin. Keep an eye out for this! Also, If you have any specific hooks you think would be useful within the plugin, let me know and I can bring them up for consideration.