bp_get_blog_latest_post_title

Return the title of the latest post on the current blog in the loop.

Description

(string) bp_get_blog_latest_post_title(); 

Returns (string)

Post title.


Usage

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

Defined (1)

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

/bp-blogs/bp-blogs-template.php  
  1. function bp_get_blog_latest_post_title() { 
  2. global $blogs_template; 
  3.  
  4. $retval = ''; 
  5.  
  6. if ( ! empty( $blogs_template->blog->latest_post ) && ! empty( $blogs_template->blog->latest_post->post_title ) ) 
  7. $retval = $blogs_template->blog->latest_post->post_title; 
  8.  
  9. /** 
  10. * Filters the title text of the latest post on the current blog in the loop. 
  11. * @since 1.7.0 
  12. * @param string $retval Title text for the latest post. 
  13. */