bp_get_default_options()

Get the default site options and their values.

Description

Default values should not be set by calls to get_option() or get_site_option() due to these causing load order problems with bp_core_clear_root_options_cache(); see #BP7227.

Return

(array) Filtered option names and values.

Source

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

function bp_get_default_options() {

	// Default options.
	$options = array(

		/* Components ********************************************************/

		'bp-deactivated-components'        => array(),

		/* XProfile **********************************************************/

		// Default profile groups name.
		'bp-xprofile-base-group-name'      => 'Details',

		// Default fullname field name.
		'bp-xprofile-firstname-field-name' => 'First Name',

		// Default fullname field name.
		'bp-xprofile-lastname-field-name'  => 'Last Name',

		// Default fullname field name.
		'bp-xprofile-nickname-field-name'  => 'Nickname',

		// Default fullname field name. (for backward compat)
		'bp-xprofile-fullname-field-name'  => 'Name',

		'bp-display-name-format'               => 'first_name',

		// Enable/Disable Profile Type.
		'bp-member-type-enable-disable'        => false,

		// Enable/Disable Display on profiles.
		'bp-member-type-display-on-profile'    => false,

		/* Blogs *************************************************************/

		// Used to decide if blogs need indexing.
		'bp-blogs-first-install'               => false,

		/* Settings **********************************************************/

		// Disable the WP to BP profile sync.
		'bp-disable-profile-sync'              => false,

		// Hide the Toolbar for logged out users.
		'hide-loggedout-adminbar'              => false,

		// Avatar uploads.
		'bp-disable-avatar-uploads'            => false,

		// cover photo uploads.
		'bp-disable-cover-image-uploads'       => false,

		// Group Profile Photos.
		'bp-disable-group-avatar-uploads'      => false,

		// Group cover photo uploads.
		'bp-disable-group-cover-image-uploads' => false,

		// Group Types.
		'bp-disable-group-type-creation'       => false,

		// Auto Group Membership Approval.
		'bp-enable-group-auto-join'            => false,

		// Group restrict invites to members who already in specific parent group.
		'bp-enable-group-restrict-invites'     => false,

		// Allow users to delete their own accounts.
		'bp-disable-account-deletion'          => false,

		// Allow site owner to enable private network.
		'bp-enable-private-network'            => true,

		// Allow comments on post and comment activity items.
		'bp-disable-blogforum-comments'        => true,

		// The ID for the current theme package.
		'_bp_theme_package_id'                 => 'nouveau',

		// Email unsubscribe salt.
		'bp-emails-unsubscribe-salt'           => '',

		/* Groups ************************************************************/

		// @todo Move this into the groups component
		// Restrict group creation to super admins.
		'bp_restrict_group_creation'   => false,

		/* Akismet ***********************************************************/

		// Users from all sites can post.
		'_bp_enable_akismet'           => true,

		/* Activity HeartBeat ************************************************/

		// HeartBeat is on to refresh activities.
		'_bp_enable_heartbeat_refresh' => true,

		/* BuddyBar **********************************************************/

		// Force the BuddyBar.
		'_bp_force_buddybar'           => false,

		/* Legacy *********************************************/

		// Do not register the bp-default themes directory.
		'_bp_retain_bp_default'        => false,

		// Ignore deprecated code.
		'_bp_ignore_deprecated_code'   => true,

		/* Invites ************************************************************/

		'bp-disable-invite-member-email-subject'     => false,
		'bp-disable-invite-member-email-content'     => true,
		'bp-disable-invite-member-type'              => false,

		/* Widgets **************************************************/
		'widget_bp_core_login_widget'                => false,
		'widget_bp_core_members_widget'              => false,
		'widget_bp_core_whos_online_widget'          => false,
		'widget_bp_core_recently_active_widget'      => false,
		'widget_bp_groups_widget'                    => false,
		'widget_bp_messages_sitewide_notices_widget' => false,
	);

	/**
	 * Filters the default options to be set upon activation.
	 *
	 * @since BuddyPress 1.6.0
	 *
	 * @param array $options Array of default options to set.
	 */
	return apply_filters( 'bp_get_default_options', $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.