Skip to:
Content
Pages
Categories
Search
Top
Bottom

Mentions and anchors in ‘latest update’ box

  • Avatar of nicholmikey
    nicholmikey
    Participant

    @nicholmikey

    Hello,

    On user profile pages their stream properly shows mentions and links in the activiy stream, but the box at the top with the latest update strips the anchor tags leaving plain text. I would like to have the mentions funtion in the latest update area.

    Any ideas?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Avatar of nicholmikey
    nicholmikey
    Participant

    @nicholmikey

    Even on the test drive this happens, the mention is there after I post an update due to the ajax call, but when I reload the page the anchor tag is stripped from the mention http://testbp.org/members/nicholmikey/

    Avatar of Boone Gorges
    Boone Gorges
    Keymaster

    @boonebgorges

    Good suggestion. I’ve opened a ticket: https://buddypress.trac.wordpress.org/ticket/3374

    In the meantime, you could probably do something by filtering bp_get_activity_latest_update_excerpt.

    Avatar of nicholmikey
    nicholmikey
    Participant

    @nicholmikey

    Thanks,

    I tried playing with that filter, looks like the mention is stripped before it is saved to the user_metadata table. Is there a function in BP that will search text for mentions and transform them into links?

    Avatar of nicholmikey
    nicholmikey
    Participant

    @nicholmikey

    I tried hooking into bp_get_activity_latest_update, it calls `get_user_meta( $user_id, ‘bp_latest_update’, true )` and applies that ` bp_get_activity_latest_update_excerpt` filter, but it looks like the anchor is already stripped before any filtering, straight from user_meta.

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.