WordPress.org

Ready to get started?Download WordPress

Forums

How to replace text in all menus? (1 post)

  1. s0what
    Member
    Posted 2 years ago #

    Hello!

    I want to replace
    inspiredaffiliate.lv/partneriem/registreties/"
    with
    inspired.adsea.pl/registration/publisher.html?lang=en_GB" onClick="popup = window.open("http://inspired.adsea.pl/registration/publisher.html?lang=en_GB", "Registration", "height=450,width=640,scrollbars=yes,resizable=yes"); return false" target="_blank"

    I wanted to write a plugin which does that, but I can't find a way to make add_filter function work on all menus.
    Also tried to do this with JS, but it broke DOM:

    <script type="text/javascript" >
    function myscript() {
    input = 'inspiredaffiliate.lv/partneriem/registreties/"';
    output='inspired.adsea.pl/registration/publisher.html?lang=en_GB" onClick="popup = window.open("http://inspired.adsea.pl/registration/publisher.html?lang=en_GB", "Registration", "height=450,width=640,scrollbars=yes,resizable=yes"); return false" target="_blank"';
    document.body.innerHTML = document.body.innerHTML.replace(input,output);
    }
    </script >

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.