BBP_BuddyPress_Activity::register_activity_actions()

Register our activity actions with BuddyBoss

Description

Source

File: bp-forums/activity.php

	public function register_activity_actions() {

		// Sitewide activity stream items
		bp_activity_set_action( $this->component, $this->topic_create, esc_html__( 'New forum discussion', 'buddyboss' ), [ $this, 'topic_activity_action_callback' ] );
		bp_activity_set_action( $this->component, $this->reply_create, esc_html__( 'New forum reply', 'buddyboss' ), [ $this, 'reply_activity_action_callback' ] );

		if ( bp_is_active( 'groups') ) {
			// Group activity stream items
			bp_activity_set_action( buddypress()->groups->id, $this->topic_create, esc_html__( 'New forum discussion', 'buddyboss' ), [ $this, 'group_forum_topic_activity_action_callback' ] );
			bp_activity_set_action( buddypress()->groups->id, $this->reply_create, esc_html__( 'New forum reply', 'buddyboss' ), [ $this, 'group_forum_reply_activity_action_callback' ] );
		}
	}

Changelog

Changelog
Version Description
bbPress (r3395) Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.