bb_ksd_bulk_post_actions

The BuddyPress bb ksd bulk post actions function.

Description

bb_ksd_bulk_post_actions( &$bulk_actions, &$post_query ); 

Parameters (2)

0. $bulk_actions
The bulk actions.
1. $post_query
The post query.

Usage

  1. if ( !function_exists( 'bb_ksd_bulk_post_actions' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-plugins/akismet.php'; 
  3.  
  4. // The bulk actions. 
  5. $bulk_actions = &$bulk_actions; 
  6.  
  7. // The post query. 
  8. $post_query = &$post_query; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bb_ksd_bulk_post_actions($bulk_actions, $post_query); 
  12.  

Defined (1)

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

/bp-forums/bbpress/bb-plugins/akismet.php  
  1. function bb_ksd_bulk_post_actions( &$bulk_actions, &$post_query ) { 
  2. $status = $post_query->get( 'post_status' ); 
  3.  
  4. $bulk_actions['unspam'] = __( 'Not Spam' ); 
  5. $bulk_actions['spam'] = __( 'Mark as Spam' ); 
  6.  
  7. if ( 2 == $status ) 
  8. unset( $bulk_actions['undelete'], $bulk_actions['spam'] ); 
  9. elseif ( is_numeric( $status ) ) 
  10. unset( $bulk_actions['unspam'] );