Something like the save_redirects function you have currently at line 784 but a way so that when I publish a post I can create one quick redirect for it with an on publish hook.
My scenario: I have a custom post type that my client wants urls with dashes as usual, but they want to auto generate redirects so the url without dashes will work too. So, my-new-post is the slug and by default the url is example.com/cpt-slug/my-new-post they also want the following url to resolve or redirect to this post: example.com/mynewpost. I can create quick redirects for each, but hoping for a way to do this programatically. So just a way to add one quick redirect to the existing.
Thanks!