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
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | 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
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.