WordPress.org

Ready to get started?Download WordPress

Forums

Why does WP filters out <xspf> tag? (2 posts)

  1. Niklas75
    Member
    Posted 8 years ago #

    Installed and activated the XSPF-player.. Got the player to work with static PHP but when I did the <xspf></xspf> stuff in a post - WP filtered it out....??? Why doesn't it work as it says in the xspf-readme.txt???

    Please help!!

  2. dirx
    Member
    Posted 7 years ago #

    i just played around a little bit with the inline post feature and stumpled over some tiny mce tag filtering problem ... add the following lines to "xspf_player.php" so tiny mce doesn´t filter the <xspf>...</xspf> tags any longer:

    add this line to the xspf_player constructor function:


    add_filter('mce_valid_elements', array('xspf_player', 'mce_valid_elements'));

    add these lines anywhere to the xspf_player class:


    function mce_valid_elements ($valid_elements)
    {
    if (empty ($valid_elements))
    return "xspf";
    return $valid_elements . ",xspf";
    }

    tested with wordpress 2.0.4 & xspf plugin 3.1

    hope this helps...

    happy coding

Topic Closed

This topic has been closed to new replies.

About this Topic