Tulip Media

Entrepreneurial thoughts

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');
}

$field = xprofile_get_field($field_id);

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

[/coded]

 

My latest tweets

New shorts on Blooness 👉 Training dedicated to the best oilseeds for health is finally available in audio format https://buff.ly/3xo9fTS
https://buff.ly/43DkrYR

New shorts on Blooness 👉 If there was only one supplement to take, it would be magnesium (along with vitamin D). The complete guide to the best multivitamins on the market still available here with free access https://buff.ly/49bHqvp
https://buff.ly/49c3rKK

New shorts on Blooness 👉 The latest Blooness training on #proteins is available in audio format https://buff.ly/4aijbMW
https://buff.ly/3TP67cB

Load more

Don't miss business advice by email

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

Leave a Reply

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

en_USEN