• Resolved m3g4d37h

    (@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 https://).

    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 https:// (ie. https://mms://radioportal.com).

    Someone please help me.

    Regards,

    M3g4d37h

    PS – To see the errors, go to my site at https://www.m3g4d37h.net, and look at the internet radio links in the sidebar.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Kafkaesqui

    (@kafkaesqui)

    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'] : 'https://' . $_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'] : 'https://' . $_POST['link_url'];

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

    Thread Starter m3g4d37h

    (@m3g4d37h)

    Thanks very much big guy. ??

    Worked like a charm!

    Regards,

    M3g4d37h

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