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
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
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.