bp_blogs_activity_comment_permalink( string $retval = '' )
Changes activity comment permalinks to use the blog comment permalink instead of the activity permalink.
Description Description
This is only done if activity commenting is allowed and whether the parent activity item is a ‘new_blog_post’ entry.
Parameters Parameters
- $retval
-
(Optional) The activity comment permalink.
Default value: ''
Return Return
(string)
Source Source
File: bp-blogs/bp-blogs-activity.php
function bp_blogs_activity_comment_permalink( $retval = '' ) { global $activities_template; // Get the current comment ID. $item_id = isset( $activities_template->activity->current_comment->item_id ) ? $activities_template->activity->current_comment->item_id : false; // Maybe adjust the link if item ID exists. if ( ( false !== $item_id ) && isset( buddypress()->blogs->allow_comments[ $item_id ] ) ) { $retval = $activities_template->activity->current_comment->primary_link; } return $retval; }
Changelog Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |