Support » Fixing WordPress » Adding “mms://” links to the sidebar

  • Resolved m3g4d37h


    Hi, I am a newbie to WP, and a very amatuerish (I am just hearning PHP/HTML, and I have a problem that is stumping me.

    I want to be able to add “streaming radio” links to my sidebar (prefixed with mms:// instead of http://).

    I found what I THOUGHT was the fix in /wp-includes/ (“kses.php”, line 42), which is;

    function wp_kses($string, $allowed_html, $allowed_protocols = array (‘mms’, ‘http’, ‘https’, ‘ftp’, ‘news’, ‘nntp’, ‘telnet’, ‘feed’, ‘gopher’, ‘mailto’))

    This did not solve the problem. My mms:// links are all being prefixed wit http:// (ie. http://mms://

    Someone please help me.



    PS – To see the errors, go to my site at, and look at the internet radio links in the sidebar.

Viewing 2 replies - 1 through 2 (of 2 total)
  • What you’re looking to change is a line in the edit_link() function (wp-admin/admin-functions.php). Around line 472 look for:

    $_POST['link_url'] = preg_match('/^(https?|ftps?|mailto|news|gopher):/is', $_POST['link_url']) ? $_POST['link_url'] : 'http://' . $_POST['link_url'];

    And add the protocol there:

    $_POST['link_url'] = preg_match('/^(https?|ftps?|mailto|news|gopher|mms):/is', $_POST['link_url']) ? $_POST['link_url'] : 'http://' . $_POST['link_url'];

    Source hacking note: Back up files before editing them, and comment your changes for future reference.

    Thanks very much big guy. 🙂

    Worked like a charm!



Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding “mms://” links to the sidebar’ is closed to new replies.