Skip to:
Content
Pages
Categories
Search
Top
Bottom

Get notification action link

  • @learntodesign

    Participant

    Is there any way to retrieve the action link of a notification from within the notifications loop?

    For example, I need something like:

    buddypress()->notifications->query_loop->notification->notification_link

Viewing 5 replies - 1 through 5 (of 5 total)
  • @shanebp

    Moderator

    The notifications loop template uses bp_the_notification_action_links() to echo those links.
    If you want to retrieve them for some other use, then this will not echo them:
    $links = bp_get_the_notification_action_links();

    @learntodesign

    Participant

    Hi Shane,

    Sorry I wasn’t clear. I want to echo the href of the notification, not the read/delete action links.

    @shanebp

    Moderator

    @learntodesign

    Participant

    Shane, I am sorry but I’m not following. If I call that function, it returns the full description of the notification.

    I am creating my own notification menu and I need solely the href, so I can can create something like this.

    <div>
    <link href=”NOTIFICATION HREF”>
    </link>
    <div>

    @shanebp

    Moderator

    Look thru that function and use one of the filter hooks to write a function that uses a conditional.

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