bbp_get_reply_revision_count

Return the revision count of the reply.

Description

(string) bbp_get_reply_revision_count( (int) $reply_id = 0, (bool) $integer = false ); 

Returns (string)

reply revision count

Parameters (2)

0. $reply_id — Optional. (int)
Reply id
1. $integer — Optional. (bool) => false
Whether or not to format the result

Usage

  1. if ( !function_exists( 'bbp_get_reply_revision_count' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/replies/template.php'; 
  3.  
  4. // Optional. Reply id 
  5. $reply_id = -1; 
  6.  
  7. // Optional. Whether or not to format the result 
  8. $integer = false; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bbp_get_reply_revision_count($reply_id, $integer); 
  12.  

Defined (1)

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

/includes/replies/template.php  
  1. function bbp_get_reply_revision_count( $reply_id = 0, $integer = false ) { 
  2. $count = (int) count( bbp_get_reply_revisions( $reply_id ) ); 
  3. $filter = ( true === $integer ) ? 'bbp_get_reply_revision_count_int' : 'bbp_get_reply_revision_count'; 
  4.  
  5. return apply_filters( $filter, $count, $reply_id );