Is there something that I can place in my functions.php file that will search my ENTIRE site for all occurrences of a URL, and then replace it with an alternative URL (i.e. the original URL but with a redirect_to extension like below).
In simpler terms...
1) Search for all occurrences of
2) Replace with
http://www.mysite.com/login?redirect_to=<?php echo "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>
Is that possible? I basically don't want to manually code this into my template files and the above solution would be perfect.
Thanks in advance!