Hi @nitinsinghal,
all the custom permalinks saved with my plugin are stored in a serialized array in wp_options table.
Here you can find more information:
https://permalinkmanager.pro/docs/filters-hooks/how-the-custom-uris-and-redirects-are-stored/
Best regards,
Maciej
Thanks @mbis, that helped me a lot.
Sorry, one more thing: Do we also have an event that can be caught when “Current URI” changes for a post?
Maybe we can get the post id, old URI & the new URI.
Regards
-
This reply was modified 5 years, 7 months ago by
nitinsinghal.
Hi @nitinsinghal,
yes, you can use the below code as a foundation:
function pm_updated_permalink_hook($post_id, $new_uri, $old_uri, $native_uri, $default_uri, $single_update) {
if($new_uri !== $old_uri) {
// The custom permalink was updated.
}
}
add_action('permalink_manager_updated_post_uri', 'pm_updated_permalink_hook', 99, 6);