Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/29/2014 12:40:28 AM (12 years ago)
Author:
boonebgorges
Message:

Use WP's comment depth setting to limit activity comment depth

Fixes #2768

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-classes.php

    r8187 r8201  
    10081008                        }
    10091009
     1010                        // Calculate depth for each item
     1011                        foreach ( $ref as &$r ) {
     1012                                $depth = 1;
     1013                                $parent_id = $r->secondary_item_id;
     1014                                while ( $parent_id !== $r->item_id ) {
     1015                                        $depth++;
     1016                                        $parent_id = $ref[ $parent_id ]->secondary_item_id;
     1017                                }
     1018                                $r->depth = $depth;
     1019                        }
     1020
    10101021                        // If we cache a value of false, it'll count as a cache
    10111022                        // miss the next time the activity comments are fetched.
Note: See TracChangeset for help on using the changeset viewer.