Skip to:
Content
Pages
Categories
Search
Top
Bottom

Buddypress bp_activity_add parameters

  • Avatar of rafaelfragosom
    rafaelfragosom
    Participant

    @rafaelfragosom

    I have this question about the “type” and the “component” parameters. Which of these do I use to differentiate the different types of activity?

    I have downloaded a Q&A plugin and when I call `print bp_get_activity_type();` inside the entry.php I got the same `activity_update` type.

    I’m adding entries like that:

    `bp_activity_add( array(
    ‘id’ => $activity_id,
    ‘user_id’ => $admin_id,
    ‘item_id’ => $post_id,
    ‘action’ => $activity_action,
    ‘content’ => $activity_content,
    ‘component’ => ‘blog-post’,
    ‘primary_link’ => $permalink,
    ‘type’ => ‘activity_update’,
    ‘hide_sitewide’ => false
    ));`

    Is there a function to know what the “component” is or should I change my “type”? I don’t know what I’m doing hehe.

    Thanks!

You must be logged in to reply to this topic.