How to use Javascript in Link – Link Manager
-
I’m trying to add a new link to my links manager, but when I put something like “javascript:someFunction()” in the web address field, the manager automatically disregards what I entered. I’ve figured out that the manager only allows you to enter strings with a valid protocol (ie. ‘http’, ‘https’, ‘ftp, etc…). I was able to get pass that by editing the “esc_url” function in the “formatting.php” file. This allowed me to save the link with the desired script entered in the web address field, but now when I try and use that link, wordpress inserts a ‘#’ in for ‘href’ attribute instead of my script. Anyone have any ideas on how to circumvent this issue?
Thanks,
Anthony
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How to use Javascript in Link – Link Manager’ is closed to new replies.