BBP_BuddyPress_Activity::activity_get_permalink( string $link = '', mixed $activity_object = false )

Maybe link directly to topics and replies in activity stream entries


Description Description


Parameters Parameters

$link

(Optional)

Default value: ''

$activity_object

(Optional)

Default value: false


Top ↑

Return Return

(string) The link to the activity stream item


Top ↑

Source Source

File: includes/extend/buddypress/activity.php

	public function activity_get_permalink( $link = '', $activity_object = false ) {

		// Setup the array of actions to link directly to
		$disabled_actions = array(
			$this->topic_create,
			$this->reply_create
		);

		// Check if this activity stream action is directly linked
		if ( in_array( $activity_object->type, $disabled_actions, true ) ) {
			$link = $activity_object->primary_link;
		}

		return $link;
	}

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.