Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: HTML not sticking in Profile Field…

@danbp

Participant

Do you try to create a button via a profile field ? Huh… Preferably do that via a template.

If you want to enter some html, you could try to remove the one or other filter.

This snipet (untested) handles the description field. Modify the filter to your nedd. Check bp-xprofile-filters.php to get the name.
Not that i added some conditionnals for field and user.

Try:

function my_field_remove_html_filter() {

if ( bp_is_active( 'xprofile' ) )

$bp_this_field_name = bp_get_the_profile_field_name();
   
   if( 'is_super_admin' ) {
	// field name (case sensitive)
	if( $bp_this_field_name == 'FIELD_NAME' ) {	  
	remove_filter( 'bp_get_the_profile_field_description', 'wp_filter_kses' );
      }
   }
}
add_action( 'bp_init', 'my_field_remove_html_filter' );

Add it to bp-custom.php.

Skip to toolbar