bb_is_topic_lastpage

Bb_is_topic_lastpage() - Report whether the current page is the last page of a given topic.

Description

(boolean) bb_is_topic_lastpage( (int) $topic_id = 0 ); 

Returns (boolean)

True if called on the last page of a topic, otherwise false

Parameters (1)

0. $topic_id — Optional. (int)
The topic id of the topic being queried

Usage

  1. if ( !function_exists( 'bb_is_topic_lastpage' ) ) { 
  2. require_once '/bp-forums/bbpress/bb-includes/functions.bb-template.php'; 
  3.  
  4. // The topic id of the topic being queried 
  5. $topic_id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bb_is_topic_lastpage($topic_id); 
  9.  

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-template.php  
  1. function bb_is_topic_lastpage( $topic_id = 0 ) { 
  2. global $page; 
  3. return ( $page == bb_get_topic_pagecount( $topic_id ) );