Skip to:
Content
Pages
Categories
Search
Top
Bottom

Removing filters for particular profile fields

  • Hey guys, had a quick question. I’m using the U Buddypress Forum Editor (don’t worry, that’s not what this thread is about) to add a wysiwyg editor to the forum. Anyway, I decided I wanted to add it to some profile fields (using s2Member, so only paying members can fill out these fields). I want to be able to safely remove the wp_filter_kses and xprofile_sanitize_data_value_before_save to JUST those profile fields so that the HTML isn’t stripped. I realize the security risk, but it’s what the client wants. Right now, the only way I could figure it out was to simply add these lines to my functions.php:

    `
    remove_filter( ‘bp_get_the_profile_field_value’, ‘wp_filter_kses’, 1 );
    remove_filter( ‘xprofile_data_value_before_save’, ‘xprofile_sanitize_data_value_before_save’, 1, 2 );
    `
    Works fine, but that remove the filters from EVERYTHING. I just want to remove the filters from certain fields. How do I do that?

  • The topic ‘Removing filters for particular profile fields’ is closed to new replies.
Skip to toolbar