Hi there. If I’m understanding correctly, you’re wanting to modify URLs added to profile fields by your users. The profile fields are analyzed for search links and other links here:
https://buddypress.trac.wordpress.org/browser/tags/2.9.3/src/bp-xprofile/bp-xprofile-filters.php#L326
BP uses the WP function make_clickable()
to make links clickable. It doesn’t look like that function is filterable at the moment (there’s a ticket: https://core.trac.wordpress.org/ticket/32787). I guess you could do something using the filter offered on the forum link you reference, but I’m not sure how you’d know which kind of links to modify (it’s not clear from your question what the goal is).
It’s not the url, it’s the url label that I want to change. Instead of it displaying the full url, the links should use an anchor label.
So if user adds a link to a github profile e.g https://www.githib.com/username the output would be text “Githib” that then links to the profile. At the moment it just prints the full url
Huh. Well, I guess you could probably find URLs like that using some regular expression pattern for
<a href="<url>"><url></a>
and apply it like you did at https://core.trac.wordpress.org/ticket/32787, but I’m no regex expert, so I can’t help with that.
It would be easier once make_clickable()
adds a filter, for sure.
If you are still look, I do have a plug-in reference that seem to be working.
site all update to 5.4 and latest BuddyPress so appears to work even though old.
just message me if still need. I have successful removed all links in customer profile fields.
@canvasstudio i have the same problem. Could you provide me with your solution?