Skip to:
Content
Pages
Categories
Search
Top
Bottom

Profile Links – Removing http/https

Viewing 7 replies - 1 through 7 (of 7 total)
  • @dcavins

    Keymaster

    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).

    @websitehelperberto

    Participant

    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

    @dcavins

    Keymaster

    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.

    @websitehelperberto

    Participant

    I think this could work but I need to have a play around with it:
    https://buddypress.org/support/topic/how-to-use-bp_member_profile_data-when-its-type-url/

    @dcavins

    Keymaster

    Sounds promising!

    @canvasstudio

    Participant

    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.

    @honoluluman

    Participant

    @canvasstudio i have the same problem. Could you provide me with your solution?

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Skip to toolbar