bb_bozo_new_post

The BuddyPress bb bozo new post function.

Description

bb_bozo_new_post( $post_id ); 

Parameters (1)

0. $post_id
The post id.

Usage

  1. if ( !function_exists( 'bb_bozo_new_post' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-plugins/bozo.php'; 
  3.  
  4. // The post id. 
  5. $post_id = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bb_bozo_new_post($post_id); 
  9.  

Defined (1)

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

/bp-forums/bbpress/bb-plugins/bozo.php  
  1. function bb_bozo_new_post( $post_id ) { 
  2. $bb_post = bb_get_post( $post_id ); 
  3. if ( isset( $post->post_status ) && 1 < $bb_post->post_status ) 
  4. bb_bozon( $bb_post->poster_id, $bb_post->topic_id ); 
  5. $topic = get_topic( $bb_post->topic_id, false ); 
  6. if ( isset( $topic->topic_posts ) && 0 == $topic->topic_posts ) 
  7. bb_delete_topic( $topic->topic_id, 2 );