bp_deactivation()

Fire deactivation hooks and events.

Description

Runs on BuddyPress deactivation.

Source

File: bp-core/bp-core-update.php

1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
function bp_deactivation() {
 
    // Force refresh theme roots.
    delete_site_transient( 'theme_roots' );
 
    // Switch to WordPress's default theme if current parent or child theme
    // depend on bp-default. This is to prevent white screens of doom.
    if ( in_array( 'bp-default', array( get_template(), get_stylesheet() ) ) ) {
        switch_theme( WP_DEFAULT_THEME, WP_DEFAULT_THEME );
        update_option( 'template_root',   get_raw_theme_root( WP_DEFAULT_THEME, true ) );
        update_option( 'stylesheet_root', get_raw_theme_root( WP_DEFAULT_THEME, true ) );
    }
 
    /**
     * Fires during the deactivation of BuddyPress.
     *
     * Use as of 1.6.0.
     *
     * @since BuddyPress 1.6.0
     */
    do_action( 'bp_deactivation' );
 
    // @deprecated as of 1.6.0
    do_action( 'bp_loader_deactivate' );
}

Changelog

Changelog
Version Description
BuddyPress 1.6.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.