bb_bozo_posts

Plugin Name: Bozo Users Plugin URI: http://bbpress.org/ Description: Allows moderators to mark certain users as a "bozo".

Description

bb_bozo_posts( $where ); 

Bozo users can post, but their content is only visible to themselves. Author: Michael Adams Version: 1.1 Author URI: http://blogwaffe.com/

Parameters (1)

0. $where
The where.

Usage

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

Defined (1)

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

/bp-forums/bbpress/bb-plugins/bozo.php  
  1. function bb_bozo_posts( $where ) { 
  2. if ( !$id = bb_get_current_user_info( 'id' ) ) 
  3. return $where; 
  4.  
  5. return preg_replace( 
  6. '/(\w+\.)?post_status = ["\']?0["\']?/',  
  7. "( \\1post_status = 0 OR \\1post_status > 1 AND \\1poster_id = '$id' )",  
  8. $where);