bb_ksd_pre_post_status

The BuddyPress bb ksd pre post status function.

Description

bb_ksd_pre_post_status( $post_status, $post_ID ); 

Parameters (2)

0. $post_status
The post status.
1. $post_id
The post id.

Usage

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

Defined (1)

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

/bp-forums/bbpress/bb-plugins/akismet.php  
  1. function bb_ksd_pre_post_status( $post_status, $post_ID ) 
  2. global $bb_current_user, $bb_ksd_pre_post_status, $bb_ksd_pre_post; 
  3.  
  4. // Don't filter content from users with a trusted role 
  5. if ( in_array( $bb_current_user->roles[0], bb_trusted_roles() ) ) { 
  6. return $post_status; 
  7.  
  8. $response = bb_ksd_submit( $bb_ksd_pre_post ); 
  9.  
  10. if ( isset( $response[1] ) ) { 
  11. bb_update_postmeta( $post_ID, 'akismet_response', $response[1] ); 
  12.  
  13. if ( 'true' == $response[1] ) { 
  14. $bb_ksd_pre_post_status = '2'; 
  15. return $bb_ksd_pre_post_status; 
  16. return $post_status;