WordPress.org

Ready to get started?Download WordPress

Forums

Custom Profile Filters for BuddyPress
[resolved] New profile fields in 1.6 ruins the functionality of (4 posts)

  1. Vernon Fowler
    Member
    Posted 1 year ago #

  2. David Abbott
    Member
    Posted 1 year ago #

    Hi. Had the same problem, but fixed it (I think (I Hope!)) in custom-profile-filters-for-buddypress-bp-functions.php.

    function cpfb_add_social_networking_links( $field_value ) {
    	global $bp, $social_networking_fields;
    
    	$bp_this_field_name = bp_get_the_profile_field_name();
    
    	if ( isset ( $social_networking_fields[$bp_this_field_name] ) ) {
    		$sp = strpos ( $field_value, $social_networking_fields[$bp_this_field_name] );
    		if ( $sp === false ) {
    			$url = str_replace( '***', strip_tags( $field_value ), $social_networking_fields[$bp_this_field_name] );
    			}
    		echo '<a href="http://' . $url . '">' . $field_value . '</a>';
    	} else {
    
    	return $field_value; }
    }
    add_filter( 'bp_get_the_profile_field_value', 'cpfb_add_social_networking_links', 1 );
  3. Mqlte
    Member
    Posted 1 year ago #

    Thanks, it seems to work well. :)

  4. Vernon Fowler
    Member
    Posted 1 year ago #

    Thanks David. Your code works. Success :)
    Thanks for confirming Mqlte.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags