BBP_BuddyPress_Activity::register_activity_actions()

Register our activity actions with BuddyPress


Description Description


Source Source

File: includes/extend/buddypress/activity.php

	public function register_activity_actions() {

		// Sitewide topic
		bp_activity_set_action(
			$this->component,
			$this->topic_create,
			esc_html__( 'New forum topic', 'bbpress' ),
			'bbp_format_activity_action_new_topic',
			esc_html__( 'Topics', 'bbpress' ),
			array( 'activity', 'member', 'member_groups', 'group' )
		);

		// Sitewide reply
		bp_activity_set_action(
			$this->component,
			$this->reply_create,
			esc_html__( 'New forum reply', 'bbpress' ),
			'bbp_format_activity_action_new_reply',
			esc_html__( 'Replies', 'bbpress' ),
			array( 'activity', 'member', 'member_groups', 'group' )
		);

		// Group forums
		/**
		 * An upstream improvement to BuddyPress is required to make these work,
		 * but they are included here to make our lives easier later.
		if ( bp_is_active( 'groups' ) ) {

			// Topic
			bp_activity_set_action(
				buddypress()->groups->id,
				$this->topic_create,
				esc_html__( 'New forum topic', 'bbpress' ),
				'bbp_format_activity_action_new_topic',
				esc_html__( 'Topics', 'bbpress' ),
				array( 'activity', 'member', 'member_groups', 'group' )
			);

			// Reply
			bp_activity_set_action(
				buddypress()->groups->id,
				$this->reply_create,
				esc_html__( 'New forum reply', 'bbpress' ),
				'bbp_format_activity_action_new_reply',
				esc_html__( 'Replies', 'bbpress' ),
				array( 'activity', 'member', 'member_groups', 'group' )
			);
		}
		*/
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.