bp_activity_has_more_items

Return true when there are more activity items to be shown than currently appear.

Description

bp_activity_has_more_items(); 

Usage

  1. if ( !function_exists( 'bp_activity_has_more_items' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-activity/bp-activity-template.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_activity_has_more_items(); 
  7.  

Defined (1)

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

/bp-activity/bp-activity-template.php  
  1. function bp_activity_has_more_items() { 
  2. global $activities_template; 
  3.  
  4. if ( ! empty( $activities_template->has_more_items ) ) { 
  5. $has_more_items = true; 
  6. } else { 
  7. $remaining_pages = 0; 
  8.  
  9. if ( ! empty( $activities_template->pag_page ) ) { 
  10. $remaining_pages = floor( ( $activities_template->total_activity_count - 1 ) / ( $activities_template->pag_num * $activities_template->pag_page ) ); 
  11.  
  12. $has_more_items = (int) $remaining_pages > 0; 
  13.  
  14. /** 
  15. * Filters whether there are more activity items to display. 
  16. * @since 1.5.0 
  17. * @param bool $has_more_items Whether or not there are more activity items to display. 
  18. */ 
  19. return apply_filters( 'bp_activity_has_more_items', $has_more_items );