prologue_comment_depth_loop

The BP Groupblog prologue comment depth loop function.

Description

prologue_comment_depth_loop( $comment_id, $depth ); 

Parameters (2)

0. $comment_id
The comment id.
1. $depth
The depth.

Usage

  1. if ( !function_exists( 'prologue_comment_depth_loop' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bp-groupblog/themes/p2/functions.php'; 
  3.  
  4. // The comment id. 
  5. $comment_id = null; 
  6.  
  7. // The depth. 
  8. $depth = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = prologue_comment_depth_loop($comment_id, $depth); 
  12.  

Defined (1)

The function is defined in the following location(s).

/themes/p2/functions.php  
  1. function prologue_comment_depth_loop( $comment_id, $depth ) { 
  2. $comment = get_comment( $comment_id ); 
  3.  
  4. if ( isset( $comment->comment_parent ) && 0 != $comment->comment_parent ) { 
  5. return prologue_comment_depth_loop( $comment->comment_parent, $depth + 1 ); 
  6. return $depth;