bp_get_default_options()

Get the default site options and their values.


Description 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 Return

(array) Filtered option names and values.


Top ↑

Source Source

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

function bp_get_default_options() {

	// Default options.
	$options = array (

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

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

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

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

		// Base fullname field name.
		'bp-xprofile-fullname-field-name'      => 'Name',

		/* 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 image uploads.
		'bp-disable-cover-image-uploads'       => false,

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

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

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

		// 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,

		/* 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 1.6.0
	 *
	 * @param array $options Array of default options to set.
	 */
	return apply_filters( 'bp_get_default_options', $options );
}

Top ↑

Changelog Changelog

Changelog
Version Description
1.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.