BuddyPress: how to remove rich text on xprofile text area

Here is a little trick for BuddyPress to remove the rich text functionalities of the editor from the xProfile text areas, like bio field for example. Add this custom code to bp-custom.php to disable the rich text:

[coded]

/*———-*/
/* REMOVE rich text on xprofile text area
/*———-*/
function antipole_remove_rich_text($field_id = null) {
if ( ! $field_id ) {
$field_id = bp_get_the_profile_field_id('3');
}

Don't miss business advice by email

No spam, just an email when new content is published.

$field = xprofile_get_field($field_id);

if ($field) {
$enabled = false;
}
}
add_filter( 'bp_xprofile_is_richtext_enabled_for_field', 'antipole_remove_rich_text' );

[/coded]

Leave a Reply

Your email address will not be published. Required fields are marked *

 

🕒 Quick and healthy meal? A perfect #keto bowl: a base of green vegetables, a protein (chicken, fish), a healthy fat (avocado, olive oil), oilseeds (chia, squash). Ready in 10 minutes. 👉 The complete guide to the ideal diet on http://blooness.com

💪 Keto ≠ 0 carbs.
Vegetables, berries and nuts are smart carbs that are compatible with a keto-Mediterranean diet. #KetoDiet
👉 Find the complete guide to the ideal diet on http://blooness.com

Load more

Don't miss business advice by email

No spam, just an email when new content is published.

en_USEN