bp-custom function to insert HTML in xprofile field stopped working
-
I was messing with this a few weeks ago and thought I figured this out.
Have the following code in bp-custom.phpfunction set_update_field( $field_value ) { $bp_this_field_name = bp_get_the_profile_field_name(); // field name (case sensitive) if( $bp_this_field_name == 'Update Page' ) { $field_value = strip_tags( $field_value ); $field_value = '<form id="frm" method="post" action="?update_post"><input type="submit" value="Update Artist Page" id="submit" class="update-page" /></form>'; } return $field_value; } add_filter( 'bp_get_the_profile_field_value','set_update_field');
This should automatically add the following html to each users field called ‘Update Page’ :
<form id="frm" method="post" action="?update_post"><input type="submit" value="Update Artist Page" id="submit" class="update-page" /></form>
While testing this a few weeks ago, it was working perfectly. Had a form/button of the html in user profiles.
Now, I come back, and on new user registrations this is not showing up anymore.. the field ‘Update Page’ is just simply blank.I do not think there was any serverside issues that affected this, but I could be wrong. Anyone have any idea on why this no longer works?
- You must be logged in to reply to this topic.