Skip to:
Content
Pages
Categories
Search
Top
Bottom

Strip all html tags forms


  • marcotroost
    Participant

    @marcotroost

    Hi!

    How does one completely strip all html tags from forms (new topic, reply)? I do not want users to be able to style their postings, and i certainly do not want them to be able to insert links.

    regards, Marco

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

  • Robin W
    Moderator

    @robin-w

    Put this in your child theme’s function file –

    ie wp-content/themes/%your-theme-name%/functions.php

    where %your-theme-name% is the name of your theme

    or use

    Code Snippets

    add_filter( 'bbp_new_topic_pre_content', 'rew_strip_tags' );
    add_filter('bbp_edit_topic_pre_content', 'rew_strip_tags' );
    add_filter( 'bbp_new_reply_pre_content', 'rew_strip_tags' );
    add_filter('bbp_edit_reply_pre_content', 'rew_strip_tags' );
    
    function rew_strip_tags ($content) {
    	$content = strip_tags($content);
    return $content ;	
    }

    Mark Smith
    Participant

    @marksmith11

    Try this one
    Restrict User Access – Membership Plugin with Force
    By Joachim Jensen – DEV Institute

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar