Skip to:
Content
Pages
Categories
Search
Top
Bottom

Action/Filter After activity is created?

  • @matthewordie

    Participant

    I’m creating a function that creates a notification based on certain keywords in the activity when an activity is posted. I tried using “bp_activity_add” but there’s no activity ID at that point. Is there another action I can use that would give me that?

Viewing 3 replies - 1 through 3 (of 3 total)
  • @henrywright

    Moderator

    bp_activity_add() will add an item to the activity stream. It sounds like you want to add a notification. Try bp_notifications_add_notification():

    bp_notifications_add_notification

    @matthewordie

    Participant

    It wasn’t the function of creating the notification I was having trouble with it was the triggering of the function. I needed it after the activity was created so I could get the ID. I figured out that $wpdb->insert_id works though on the bp_activity_add hook. So I got that figured out. Thanks for the reply though!

    @henrywright

    Moderator

    Glad you got this sorted 🙂

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