Changeset 14160
- Timestamp:
- 12/19/2025 07:39:04 PM (8 weeks ago)
- Location:
- trunk/src/bp-activity
- Files:
-
- 2 edited
-
bp-activity-template.php (modified) (1 diff)
-
classes/class-bp-activity-activity.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/bp-activity-template.php
r14149 r14160 2635 2635 $comments = BP_Activity_Activity::get_activity_comments( $comment->item_id, 1, constant( 'PHP_INT_MAX' ) ); 2636 2636 2637 if ( ! is_array( $comments ) ) {2638 $comments = [];2639 }2640 2641 2637 // Recursively find our comment object from the comment tree. 2642 2638 $comment_in_tree = BP_Activity_Activity::find_comment_in_tree( $comments, $comment->id ); -
trunk/src/bp-activity/classes/class-bp-activity-activity.php
r14149 r14160 1615 1615 * @since 1.2.0 1616 1616 * 1617 * @global wpdb $wpdb WordPress database object.1618 *1619 1617 * @param array $activities Activities to fetch comments for. 1620 1618 * @param string $spam Optional. 'ham_only' (default), 'spam_only' or 'all'. … … 1652 1650 * @param string $spam Optional. 'ham_only' (default), 'spam_only' or 'all'. 1653 1651 * @param int $top_level_parent_id Optional. The id of the root-level parent activity item. 1654 * @return array |false The updated activities with nested comments. False if no comments are found.1652 * @return array The updated activities with nested comments. 1655 1653 */ 1656 1654 public static function get_activity_comments( $activity_id, $left, $right, $spam = 'ham_only', $top_level_parent_id = 0 ) { … … 1669 1667 // activity item has no comments. 1670 1668 if ( 'none' === $comments_cache ) { 1671 return false;1669 return $comments; 1672 1670 1673 1671 // A true cache miss.
Note: See TracChangeset
for help on using the changeset viewer.