pre_post_status

The WordPress Core pre post status hook.

Description

apply_filters( 'pre_post_status', (unknown) $post_status, (unknown) $post_id, (unknown) $topic_id ); 

Parameters (3)

0. $post_status (unknown)
The post status.
1. $post_id (unknown)
The post id.
2. $topic_id (unknown)
The topic id.

Usage

To run the hook, copy the example below.
  1. $post_status = apply_filters( 'pre_post_status', $post_status, $post_id, $topic_id ); 
  2.  
  3. if ( !empty( $post_status ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the pre_post_status callback 
  2. function filter_pre_post_status( $post_status, $post_id, $topic_id ) { 
  3. // make filter magic happen here... 
  4. return $post_status
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'pre_post_status', 'filter_pre_post_status', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'pre_post_status', 'filter_pre_post_status', 10, 3 ); 

Defined (3)

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

/bp-forums/bbpress/bb-includes/functions.bb-posts.php  
  1. $post_status = (int) apply_filters('pre_post_status', $post_status, $post_id, $topic_id); 
/bp-forums/bbpress/bb-plugins/akismet.php  
  1. add_filter( 'pre_post_status', 'bb_ksd_pre_post_status', 10, 2 ); 
/bp-forums/bbpress/bb-plugins/bozo.php  
  1. add_filter( 'pre_post_status', 'bb_bozo_pre_post_status', 5, 3 );