Contents
bp_get_option( string $option_name, string $default = '' )
Retrieve an option.
Description
This is a wrapper for get_blog_option(), which in turn stores settings data (such as bp-pages) on the appropriate blog, given your current setup.
The ‘bp_get_option’ filter is primarily for backward-compatibility.
Parameters
- $option_name
-
(Required) The option to be retrieved.
- $default
-
(Optional) Default value to be returned if the option isn't set. See get_blog_option().
Default value: ''
Return
(mixed) The value for the option.
Source
File: bp-core/bp-core-options.php
function bp_get_option( $option_name, $default = '' ) { $value = get_blog_option( bp_get_root_blog_id(), $option_name, $default ); /** * Filters the option value for the requested option. * * @since BuddyPress 1.5.0 * * @param mixed $value The value for the option. */ return apply_filters( 'bp_get_option', $value ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.5.0 | Introduced. |
Related
Uses
Uses | Description |
---|---|
bp-core/bp-core-wpabstraction.php: get_blog_option() |
Retrieve blog option. |
bp-core/bp-core-functions.php: bp_get_root_blog_id() |
Get the ID of the root blog. |
bp-core/bp-core-options.php: bp_get_option |
Filters the option value for the requested option. |
Used By | Description |
---|---|
bp-core/bp-core-options.php: bp_is_relevant_feed_enabled() |
Check whether relevant feed is enabled. |
bp-templates/bp-nouveau/includes/functions.php: bp_nouveau_get_user_profile_actions() |
Return saved profile header buttons by order |
bp-xprofile/bp-xprofile-filters.php: bp_xprofile_exclude_display_name_profile_fields() |
Removed Display setting field form profile if is disabled on setting page. |
bp-core/bp-core-options.php: bp_core_display_name_format() |
Default display name format. |
bp-core/bp-core-options.php: bp_enable_group_hide_subgroups() |
Are group hide subgroups from the main Groups Directory? |
bp-core/bp-core-options.php: bp_is_activity_edit_enabled() |
Check whether Activity edit is enabled. |
bp-core/bp-core-options.php: bp_get_activity_edit_time() |
Get BuddyBoss Activity Time option. |
bp-document/bp-document-template.php: bp_get_document_folder_date() |
Return the document date created. |
bp-document/bp-document-template.php: bp_get_document_date() |
Return the document date created. |
bp-document/bp-document-template.php: bp_get_document_date_modified() |
Return the document date created. |
bp-document/bp-document-template.php: bp_get_document_date_created() |
Return the document date created. |
bp-members/classes/class-bp-rest-signup-endpoint.php: BP_REST_Signup_Endpoint::bp_rest_xprofile_base_group_id() |
Get the group id of the base name field – from bp_xprofile_base_group_id() |
bp-media/bp-media-settings.php: bp_document_extensions_list() |
Checks if extension support is enabled. |
bp-friends/classes/class-bp-core-friends-widget.php: BP_Core_Friends_Widget::get_user_display_name() |
Display user name to ‘First Name’ when they have selected ‘First Name & Last Name’ in display format. |
bp-core/bp-core-update.php: bp_update_default_doc_extensions() | |
bp-core/bp-core-options.php: bp_custom_register_page_url() |
Register page URL. |
bp-core/bp-core-options.php: bp_disable_group_messages() |
Are group messages disabled? |
bp-core/bp-core-options.php: bp_allow_custom_registration() |
Allow custom registration. |
bp-core/bp-core-options.php: bp_register_confirm_email() |
Display email confirmation field in registrations. |
bp-core/bp-core-options.php: bp_register_confirm_password() |
Display password confirmation field in registrations. |
bp-core/bp-core-options.php: bp_profile_layout_default_format() |
Default layout option for the members listing |
bp-core/bp-core-options.php: bp_group_layout_default_format() |
Default layout option for the groups listing |
bp-core/bp-core-options.php: bp_is_activity_tabs_active() |
Check whether Activity Tabs are enabled. |
bp-core/bp-core-functions.php: bp_core_hide_display_name_field() |
Whether or not profile field is hidden. |
bp-core/classes/class-bp-rest-settings-endpoint.php: BP_REST_Settings_Endpoint::get_buddyboss_platform_settings() |
Get BuddyBoss Platform Settings. |
bp-core/classes/class-bp-core-follow-follower-widget.php: BP_Core_Follow_Follower_Widget::get_user_display_name() |
Display user name to ‘First Name’ when they have selected ‘First Name & Last Name’ in display format. |
bp-core/classes/class-bp-core-follow-following-widget.php: BP_Core_Follow_Following_Widget::get_user_display_name() |
Display user name to ‘First Name’ when they have selected ‘First Name & Last Name’ in display format. |
bp-core/classes/class-bp-rest-components-endpoint.php: BP_REST_Components_Endpoint::get_items() |
Retrieve components. |
bp-core/admin/bp-core-admin-tools.php: bp_admin_update_activity_favourite() |
Check if BuddyPress activity favorites data needs upgrade & Update to BuddyBoss activity like data |
bp-core/admin/bp-core-admin-settings.php: bp_admin_setting_callback_group_layout_type_format() |
Admin Settings for Settings > Groups > Group Directories |
bp-core/admin/settings/bp-admin-setting-xprofile.php: BP_Admin_Setting_Xprofile::bp_admin_setting_profile_layout_type_format() |
Admin Settings for Settings > Profiles > Profile Directories > Default Format |
bp-xprofile/bp-xprofile-functions.php: bp_xprofile_get_member_display_name() |
Get the display_name for member based on user_id |
bp-core/bp-core-options.php: bp_hide_last_name() |
Allow members to hide last name field if in display format first name selected. |
bp-core/bp-core-options.php: bp_hide_nickname_first_name() |
Allow members to hide first name field if in display format nick name selected. |
bp-core/bp-core-options.php: bp_hide_nickname_last_name() |
Allow members to hide last name field if in display format nick name selected. |
bp-xprofile/bp-xprofile-functions.php: bp_xprofile_base_group_id() |
Get the group id of the base name field |
bp-core/bp-core-options.php: bp_show_admin_adminbar() |
Is the Toolbar hidden for admin users? |
bp-core/compatibility/bp-incompatible-plugins-helper.php: bp_core_update_group_fields_id_in_db() |
On BuddyPress update |
bp-core/bp-core-options.php: bp_enable_profile_gravatar() |
Are members able to use gravatars? |
bp-forums/common/template.php: bbp_is_forum_archive() |
Check if we are viewing a forum archive. |
bp-media/bp-media-settings.php: bp_media_get_gif_api_key() |
Return GIFs API Key |
class-buddypress.php: BuddyPress::includes() |
Include required files. |
bp-blogs/bp-blogs-functions.php: bp_blogs_record_existing_blogs() |
Populate the BP blogs table with existing blogs. |
bp-xprofile/bp-xprofile-functions.php: bp_xprofile_nickname_field_id() |
Get the field id of the nick name field, fallback to default fullname field |
bp-xprofile/bp-xprofile-functions.php: bp_xprofile_firstname_field_id() |
Get the field id of the first name field |
bp-xprofile/bp-xprofile-functions.php: bp_xprofile_lastname_field_id() |
Get the field id of the last name field |
bp-groups/bp-groups-template.php: bp_user_can_create_groups() |
Determine if the current logged in user can create groups. |
bp-members/bp-members-functions.php: bp_members_add_role_after_activation() |
Add default WordPress role for new signups on the BP root blog. |
bp-members/classes/class-bp-members-admin.php: BP_Members_Admin::bp_update_registration_update_option() |
Update site registrations options based on the WordPress settings on plugin activate. |
bp-members/bp-members-template.php: bp_get_signup_allowed() |
Is user signup allowed? |
bp-integrations/learndash/library/SyncGenerator.php: SyncGenerator::getLastSyncTimestamp() |
Get the timestamp when the group is last synced |
bp-templates/bp-nouveau/includes/messages/functions.php: bp_nouveau_get_message_date() |
Get message date. |
bp-templates/bp-nouveau/includes/template-tags.php: bp_nouveau_get_loop_classes() |
Get the component’s loop classes |
bp-templates/bp-nouveau/includes/functions.php: bp_nouveau_get_appearance_settings() |
Get the BP Nouveau Appearance settings. |
bp-templates/bp-nouveau/buddypress-functions.php: BP_Nouveau::bp_change_forum_slug_on_edit_save_page() |
Set the forum slug on edit page from backend. |
bp-core/admin/bp-core-admin-schema.php: bp_core_install_default_profiles_fields() |
Install default profile fields. |
bp-core/admin/bp-core-admin-components.php: bp_core_admin_components_options() |
Creates reusable markup for component setup on the Components and Pages dashboard panel. |
bp-core/admin/bp-core-admin-components.php: bp_core_admin_components_settings_handler() |
Handle saving the Component settings. |
bp-core/admin/bp-core-admin-components.php: bp_core_admin_components_activation_handler() |
Handle saving the Component settings. |
bp-core/admin/bp-core-admin-schema.php: bp_core_install() |
Main installer. |
bp-core/admin/bp-core-admin-tools.php: bp_core_admin_notice_repopulate_blogs_resume() |
Add notice on the “Tools > BuddyPress” page if more sites need recording. |
bp-core/admin/bp-core-admin-pages.php: bp_admin_setting_callback_page_directory_dropdown() |
Pages drop downs callback |
bp-core/admin/bp-core-admin-tools.php: repair_default_profiles_fields() |
Repair default profile fields. |
bp-core/admin/settings/bp-admin-setting-xprofile.php: BP_Admin_Setting_Xprofile::settings_save() | |
bp-core/admin/settings/bp-admin-setting-xprofile.php: BP_Admin_Setting_Xprofile::register_fields() | |
bp-core/admin/bp-core-admin-functions.php: bp_change_forum_slug_quickedit_save_page() |
Set the forum slug on edit page from backend. |
bp-core/admin/bp-core-admin-functions.php: bp_core_activation_notice() |
Verify that some BP prerequisites are set up properly, and notify the admin if not. |
bp-core/admin/bp-core-admin-settings.php: bp_get_form_option() |
Return settings API option |
bp-core/bp-core-update.php: bp_add_activation_redirect() |
Redirect user to BP’s What’s New page on first page load after activation. |
bp-core/bp-core-update.php: bp_update_to_1_9() |
Add the notifications component to active components. |
bp-core/bp-core-update.php: bp_is_update() |
Is this a BuddyPress update? |
bp-core/bp-core-update.php: bp_version_updater() |
Initialize an update or installation of BuddyPress. |
bp-core/deprecated/buddypress/2.8.php: bp_core_admin_php53_admin_notice() |
Add an admin notice to installations that are not running PHP 5.3+. |
bp-core/deprecated/buddypress/2.1.php: bp_core_load_buddybar_css() |
Enqueue the BuddyBar CSS. |
bp-core/deprecated/buddypress/2.1.php: bp_groups_adminbar_admin_menu() |
Add menu items to the BuddyBar. |
bp-core/deprecated/buddypress/2.1.php: bp_core_admin_bar() |
Wrapper function for rendering the BuddyBar. |
bp-core/deprecated/buddypress/2.5.php: bp_core_deprecated_email_actions() |
Add support for pre-2.5 email actions. |
bp-core/deprecated/buddypress/2.5.php: bp_core_email_from_name_filter() |
Set “From” name in outgoing email to the site name. |
bp-core/bp-core-tools-default-data.php: bp_dd_import_forums() |
Importer engine – FORMS |
bp-core/bp-core-tools-default-data.php: bp_dd_import_forums_topics() |
Import topics in to forums. |
bp-core/bp-core-tools-default-data.php: bp_dd_import_forums_topics_replies() |
Import replies in to forums. |
bp-core/bp-core-tools-default-data.php: bp_dd_import_forums_in_groups() |
Import Forums in Groups |
bp-core/bp-core-tools-default-data.php: bp_dd_update_import() |
Save when the importing was done. |
bp-core/bp-core-tools-default-data.php: bp_dd_get_forums_enable_groups_ids() |
Get the array (or a string) of forums group IDs. |
bp-core/bp-core-tools-default-data.php: bp_dd_get_random_forums_ids() |
Get the array (or a string) of forum IDs. |
bp-core/bp-core-tools-default-data.php: bp_dd_get_random_topics_ids() |
Get the array (or a string) of topics IDs. |
bp-core/bp-core-tools-default-data.php: bp_dd_get_random_users_ids() |
Get the array (or a string) of user IDs. |
bp-core/bp-core-tools-default-data.php: bp_dd_is_imported() |
Check whether something was imported or not. |
bp-core/bp-core-tools-default-data.php: bp_dd_get_random_groups_ids() |
Get the array (or a string) of group IDs. |
bp-core/bp-core-tools-default-data.php: bp_admin_tools_default_data_save() |
Save dummy data value when dummy data add button is pressed |
bp-core/bp-core-tools-default-data.php: bp_dd_delete_dummy_members() |
Delete all the dummy members |
bp-core/bp-core-tools-default-data.php: bp_dd_delete_dummy_reply() |
Delete all the forum dummy reply |
bp-core/bp-core-tools-default-data.php: bp_dd_delete_dummy_topic() |
Delete all the forum dummy topic |
bp-core/bp-core-tools-default-data.php: bp_dd_delete_dummy_forum() |
Delete all the forum dummy forum |
bp-core/bp-core-tools-default-data.php: bp_dd_delete_dummy_groups() |
Delete all the forum dummy groups |
bp-core/bp-core-tools-default-data.php: bp_dd_delete_dummy_xprofile() |
Delete all the BB dummy xprofile fields |
bp-core/bp-core-template.php: bp_get_email_subject() |
Retrieve a client friendly version of the root blog name. |
bp-core/bp-core-template.php: bp_format_time() |
Format a date based on a UNIX timestamp. |
bp-core/bp-core-moderation.php: bp_core_check_for_flood() |
Check for flooding. |
bp-core/profile-search/bps-start.php: bp_profile_search_main_form() |
Returns BuddyBoss Profile Search form ID? |
bp-core/classes/class-bp-phpmailer.php: BP_PHPMailer::bp_email() |
Send email(s). |
bp-core/classes/class-bp-admin-tab.php: BP_Admin_Tab::get_input_value() | |
bp-core/classes/class-bp-email.php: BP_Email::__construct() |
Constructor. |
bp-core/classes/class-bp-core.php: BP_Core::load_components() |
Load components files |
bp-core/bp-core-caps.php: bp_set_current_user_default_role() |
Set a default role for the current user. |
bp-core/bp-core-functions.php: bp_core_get_active_custom_post_type_feed() |
Returns the active custom post type activity feed CPT array. |
bp-core/bp-core-functions.php: bp_email_get_appearance_settings() |
Return email appearance settings. |
bp-core/bp-core-functions.php: bp_email_get_salt() |
Get a persistent salt for email unsubscribe links. |
bp-core/bp-core-functions.php: bp_core_get_directory_page_ids() |
Fetch a list of BP directory pages from the appropriate meta table. |
bp-core/bp-core-adminbar.php: bp_core_load_admin_bar() |
Handle the Toolbar/BuddyBar business. |
bp-core/bp-core-filters.php: bp_email_set_default_tokens() |
Add default email tokens. |
bp-core/bp-core-avatars.php: bp_core_avatar_default() |
Get the URL of the ‘full’ default avatar. |
bp-core/bp-core-options.php: bp_disable_invite_member_type() |
Is allow users to sign up the profile types to personal inviting? |
bp-core/bp-core-options.php: bp_is_post_type_feed_enable() |
Checks if post type feed is enabled. |
bp-core/bp-core-options.php: bp_is_custom_post_type_feed_enable() |
Checks if custom post type feed is enabled. |
bp-core/bp-core-options.php: bp_platform_is_feed_enable() |
Checks if default platform activity feed is enabled. |
bp-core/bp-core-options.php: bp_enable_site_registration() |
Is the Registration enabled? |
bp-core/bp-core-options.php: bp_member_type_default_on_registration() |
Default member type on registration. |
bp-core/bp-core-options.php: bp_enable_send_invite_member_type() |
Checks if member type have send invites enabled. |
bp-core/bp-core-options.php: bp_enable_private_network_public_content() |
Add URL OR URI which will ignore even if private network is enabled. |
bp-core/bp-core-options.php: bp_show_login_adminbar() |
Is the Toolbar hidden for logged in users? |
bp-core/bp-core-options.php: bp_disable_invite_member_email_subject() |
Is invite email subject customize disabled? |
bp-core/bp-core-options.php: bp_disable_invite_member_email_content() |
Is invite email content customize disabled? |
bp-core/bp-core-options.php: bp_is_activity_heartbeat_active() |
Check whether Activity Heartbeat refresh is enabled. |
bp-core/bp-core-options.php: bp_is_activity_follow_active() |
Check whether Activity Follow is enabled. |
bp-core/bp-core-options.php: bp_is_activity_like_active() |
Check whether Activity Like is enabled. |
bp-core/bp-core-options.php: bp_is_activity_link_preview_active() |
Check whether Activity Link Preview is enabled. |
bp-core/bp-core-options.php: bp_force_friendship_to_message() |
Is force friendship to message disabled? |
bp-core/bp-core-options.php: bp_member_type_enable_disable() |
Is member type disabled? |
bp-core/bp-core-options.php: bp_member_type_display_on_profile() |
Is display on profile disabled? |
bp-core/bp-core-options.php: bp_is_akismet_active() |
Check whether Akismet is enabled. |
bp-core/bp-core-options.php: bp_is_activity_autoload_active() |
Check whether Activity Autoload is enabled. |
bp-core/bp-core-options.php: bp_enable_group_hierarchies() |
Are group hierarchies enabled? |
bp-core/bp-core-options.php: bp_enable_group_restrict_invites() |
Are group restrict invites to members who already in specific parent group? |
bp-core/bp-core-options.php: bp_enable_group_auto_join() |
Is Auto Group Membership Approval enabled? |
bp-core/bp-core-options.php: bp_disable_account_deletion() |
Are members able to delete their own accounts? |
bp-core/bp-core-options.php: bp_enable_private_network() |
Enable private network for site owner. |
bp-core/bp-core-options.php: bp_disable_blogforum_comments() |
Are post/comment activity feed comments disabled? |
bp-core/bp-core-options.php: bp_restrict_group_creation() |
Is group creation turned off? |
bp-core/bp-core-options.php: bp_force_buddybar() |
Should the old BuddyBar be forced in place of the WP admin bar? |
bp-core/bp-core-options.php: bp_disable_group_cover_image_uploads() |
Are group cover photos disabled? |
bp-core/bp-core-options.php: bp_disable_group_type_creation() |
Are group types creation disabled? |
bp-core/bp-core-options.php: bp_disable_advanced_profile_search() |
Is advanced profile search disabled? |
bp-core/bp-core-options.php: bp_hide_loggedout_adminbar() |
Is the Toolbar hidden for logged out users? |
bp-core/bp-core-options.php: bp_disable_avatar_uploads() |
Are members able to upload their own avatars? |
bp-core/bp-core-options.php: bp_disable_cover_image_uploads() |
Are members able to upload their own cover photos? |
bp-core/bp-core-options.php: bp_disable_group_avatar_uploads() |
Are group avatars disabled? |
bp-core/bp-core-options.php: bp_core_activate_site_options() |
Copy BP options from a single site to multisite config. |
bp-activity/bp-activity-functions.php: bp_show_streamed_activity_comment() |
Return if the activity stream should show activty comments as streamed or threaded |
bp-activity/bp-activity-functions.php: bp_activity_favorites_upgrade_data() |
Check if BuddyPress activity favorites data needs upgrade & Update to BuddyBoss activity like data |
bp-activity/classes/class-bp-activity-component.php: BP_Activity_Component::includes() |
Include component files. |
bp-activity/classes/class-bp-akismet.php: BP_Akismet::send_akismet_request() |
Contact Akismet to check if this is spam or ham. |
bp-activity/classes/class-bp-activity-list-table.php: BP_Activity_List_Table::column_comment() |
Content column, and “quick admin” rollover actions. |
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.