bp_add_options()

Add default options when BuddyPress is first activated.

Description

Only called once when BuddyPress is activated. Non-destructive, so existing settings will not be overridden.

Source

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

170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
function bp_add_options() {
 
    // Get the default options and values.
    $options = bp_get_default_options();
 
    // Add default options.
    foreach ( $options as $key => $value ) {
        bp_add_option( $key, $value );
    }
 
    /**
     * Fires after the addition of default options when BuddyPress is first activated.
     *
     * Allows previously activated plugins to append their own options.
     *
     * @since BuddyPress 1.6.0
     */
    do_action( 'bp_add_options' );
}

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.