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

Maybe link directly to topics and replies in activity stream entries

Description

Parameters

$link

(Optional)

Default value: ''

$activity_object

(Optional)

Default value: false

Return

(string) The link to the activity stream item

Source

File: bp-forums/activity.php

343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
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 ) ) {
        $link = $activity_object->primary_link;
    }
 
    return $link;
}

Changelog

Changelog
Version Description
bbPress (r3399) 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.