bp_blogs_activity_comment_single_permalink( string $retval, BP_Activity_Activity $activity )
Changes single activity comment entries to use the blog comment permalink.
Description
This is only done if the activity comment is associated with a blog comment.
Parameters
- $retval
-
(Required) The activity permalink.
- $activity
-
(Required) Activity object.
Return
(string)
Source
File: bp-blogs/bp-blogs-activity.php
1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 | function bp_blogs_activity_comment_single_permalink( $retval , $activity ) { if ( 'activity_comment' !== $activity ->type ) { return $retval ; } if ( bp_disable_blogforum_comments() ) { return $retval ; } $parent_activity = new BP_Activity_Activity( $activity ->item_id ); if ( isset( $parent_activity ->type ) && bp_activity_post_type_get_tracking_arg( $parent_activity ->type, 'post_type' ) ) { $retval = $activity ->primary_link; } return $retval ; } |
Changelog
Version | Description |
---|---|
BuddyPress 2.0.1 | 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.