Yes, I understand that this would only be for Redirection. I can handle finding any other possible redirects, such as with the _wp_old_slug
for posts.
My use case is this:
I’m dynamically adding some link rel="alternate"
tags that contain the URL to the current page in different languages (multisite). If you’re on the US /contact
page, it will show /kontakt
for Germany. We use Redirection already on the German site to redirect from /contact
to /kontakt
. So, if there’s a way to run some function like get_url_after_redirects('/contact')
then I would be able to get the final URL that it would reach after Redirection.