bp_forums_get_post

Get a single post object by ID.

Description

(object) bp_forums_get_post( (int) $post_id ); 

Wrapper for .

Returns (object)

Post object.

Parameters (1)

0. $post_id (int)
ID of the post being fetched.

Usage

  1. if ( !function_exists( 'bp_forums_get_post' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bp-forums-functions.php'; 
  3.  
  4. // ID of the post being fetched. 
  5. $post_id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_forums_get_post($post_id); 
  9.  

Defined (1)

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

/bp-forums/bp-forums-functions.php  
  1. function bp_forums_get_post( $post_id ) { 
  2.  
  3. /** This action is documented in bp-forums/bp-forums-screens.php */ 
  4. return bb_get_post( $post_id );