bp_deactivation

Fire deactivation hooks and events.

Description

bp_deactivation(); 

Runs on BuddyPress deactivation.


Usage

  1. if ( !function_exists( 'bp_deactivation' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/bp-core-update.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_deactivation(); 
  7.  

Defined (1)

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

/bp-core/bp-core-update.php  
  1. function bp_deactivation() { 
  2.  
  3. // Force refresh theme roots. 
  4. delete_site_transient( 'theme_roots' ); 
  5.  
  6. // Switch to WordPress's default theme if current parent or child theme 
  7. // depend on bp-default. This is to prevent white screens of doom. 
  8. if ( in_array( 'bp-default', array( get_template(), get_stylesheet() ) ) ) { 
  9. switch_theme( WP_DEFAULT_THEME, WP_DEFAULT_THEME ); 
  10. update_option( 'template_root', get_raw_theme_root( WP_DEFAULT_THEME, true ) ); 
  11. update_option( 'stylesheet_root', get_raw_theme_root( WP_DEFAULT_THEME, true ) ); 
  12.  
  13. /** 
  14. * Fires during the deactivation of BuddyPress. 
  15. * Use as of 1.6.0. 
  16. * @since 1.6.0 
  17. */ 
  18.  
  19. // @deprecated as of 1.6.0