bbp_do_uninstall

Uninstall all bbPress options and capabilities from a specific site.

Description

bbp_do_uninstall( (int) $site_id = 0 ); 

Parameters (1)

0. $site_id — Optional. (int)
The site id.

Usage

  1. if ( !function_exists( 'bbp_do_uninstall' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/admin/functions.php'; 
  3.  
  4. // The site id. 
  5. $site_id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bbp_do_uninstall($site_id); 
  9.  

Defined (1)

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

/includes/admin/functions.php  
  1. function bbp_do_uninstall( $site_id = 0 ) { 
  2. if ( empty( $site_id ) ) 
  3. $site_id = get_current_blog_id(); 
  4.  
  5. switch_to_blog( $site_id ); 
  6. flush_rewrite_rules(); 
  7. restore_current_blog();