Hook on all links? Hack esc_url()
-
Hi,
I would like to transform every URL and SRC attributes (in fact the best would be to transform all URLs no matter where they are, even scripts and csss in head links).
I made it by hacking .htaccess to point everything to index-custom.php containing:
<?php ob_start('customHtmlModifications'); require_once('index.php'); ... function customHtmlModifications($FullHtml) { } ?>
BUT it is not compatible with W3 Total Cache. (unmodified html is cached).
I’m considering to call w3tc_add_ob_callback(), but I would prefer to have something working with/without W3TC.
Could you please advice me, which action/filter/hook should I use to modify all URLs on the fly? The less hooks, the better.
Ideal could be to have a hook inside of function esc_url()?
Thanks for help,
WordPress novice..
- The topic ‘Hook on all links? Hack esc_url()’ is closed to new replies.