bp_nouveau_activity_recurse_comments( object $comment )

Loops through a level of activity comments and loads the template for each.

Description

Note: This is an adaptation of the bp_activity_recurse_comments() BuddyPress core function

Parameters

$comment

(Required) The activity object currently being recursed.

Source

File: bp-templates/bp-nouveau/includes/activity/template-tags.php

716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
function bp_nouveau_activity_recurse_comments( $comment ) {
    global $activities_template;
 
    if ( empty( $comment->children ) ) {
        return;
    }
 
    /**
     * Filters the opening tag for the template that lists activity comments.
     *
     * @since BuddyPress 1.6.0
     *
     * @param string $value Opening tag for the HTML markup to use.
     */
    echo apply_filters( 'bp_activity_recurse_comments_start_ul', '<ul>' );
 
    foreach ( (array) $comment->children as $comment_child ) {
 
        // Put the comment into the global so it's available to filters.
        $activities_template->activity->current_comment = $comment_child;
 
        /**
         * Fires before the display of an activity comment.
         *
         * @since BuddyPress 1.5.0
         */
        do_action( 'bp_before_activity_comment' );
 
        bp_get_template_part( 'activity/comment' );
 
        /**
         * Fires after the display of an activity comment.
         *
         * @since BuddyPress 1.5.0
         */
        do_action( 'bp_after_activity_comment' );
 
        unset( $activities_template->activity->current_comment );
    }
 
    /**
     * Filters the closing tag for the template that list activity comments.
     *
     * @since BuddyPress 1.6.0
     *
     * @param string $value Closing tag for the HTML markup to use.
     */
    echo apply_filters( 'bp_activity_recurse_comments_end_ul', '</ul>' );
}

Changelog

Changelog
Version Description
BuddyPress 3.0.0 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.