Contents
bp_update_option( string $option_name, mixed $value )
Save an option.
Description
This is a wrapper for update_blog_option(), which in turn stores settings data (such as bp-pages) on the appropriate blog, given your current setup.
Parameters
- $option_name
-
(Required) The option key to be set.
- $value
-
(Required) The value to be set.
Return
(bool) True on success, false on failure.
Source
File: bp-core/bp-core-options.php
function bp_update_option( $option_name, $value ) { return update_blog_option( bp_get_root_blog_id(), $option_name, $value ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.5.0 | Introduced. |
Related
Uses
Uses | Description |
---|---|
bp-core/bp-core-wpabstraction.php: update_blog_option() |
Update blog option. |
bp-core/bp-core-functions.php: bp_get_root_blog_id() |
Get the ID of the root blog. |
Used By | Description |
---|---|
bp-core/classes/class-bp-rest-components-endpoint.php: BP_REST_Components_Endpoint::deactivate_helper() |
Deactivate component helper. |
bp-core/classes/class-bp-rest-components-endpoint.php: BP_REST_Components_Endpoint::activate_helper() |
Activate component helper. |
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_core_admin_settings_save() |
Save our settings. |
bp-members/classes/class-bp-members-admin.php: BP_Members_Admin::bp_registration_update_site_option() |
Update the BuddyBoss > Settings > General > Registrations options based on the Multi Site registration settings. |
bp-blogs/bp-blogs-functions.php: bp_core_admin_get_active_custom_post_type_feed() |
Save all the public custom post type to options. |
bp-blogs/bp-blogs-functions.php: bp_blogs_record_existing_blogs() |
Populate the BP blogs table with existing blogs. |
bp-xprofile/bp-xprofile-admin.php: xprofile_admin_manage_group() |
Handles the adding or editing of groups. |
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/classes/class-bp-members-admin.php: BP_Members_Admin::multisite_registration_on() |
Create registration pages when multisite user registration is turned on. |
bp-members/classes/class-bp-members-admin.php: BP_Members_Admin::single_site_registration_on() |
Create registration pages when single site registration is turned on. |
bp-integrations/learndash/core/Settings.php: Settings::update() |
Presist the loader value to db |
bp-integrations/learndash/core/Settings.php: Settings::setGroupSyncTimestamp() |
Set the group sync timestamp to determine if we need a full sync of simple sync |
bp-integrations/learndash/core/Settings.php: Settings::installDefaultSettings() |
Presist the default option into db if not exists |
bp-integrations/learndash/library/SyncGenerator.php: SyncGenerator::getLastSyncTimestamp() |
Get the timestamp when the group is last synced |
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_emails() |
Add default emails. |
bp-core/admin/bp-core-admin-schema.php: bp_core_install_bbp_emails() |
Add default bbp emails. |
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_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-pages.php: bp_core_admin_maybe_save_pages_settings() |
Save BuddyBoss pages settings |
bp-core/admin/bp-core-admin-tools.php: repair_default_profiles_fields() |
Repair default profile fields. |
bp-core/admin/settings/bp-admin-setting-activity.php: BP_Admin_Setting_Activity::settings_save() | |
bp-core/admin/settings/bp-admin-setting-xprofile.php: BP_Admin_Setting_Xprofile::settings_save() | |
bp-core/admin/settings/bp-admin-setting-forums.php: BP_Admin_Setting_Forums::settings_save() | |
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_admin_create_background_page() |
Catch and process an admin directory page. |
bp-core/admin/bp-core-admin-functions.php: bp_core_admin_notice_dismiss_callback() |
Catch and process an admin notice dismissal. |
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/deprecated/buddypress/1.7.php: bp_update_db_stuff() |
This function was originally used to update pre-1.1 schemas, but that was before we had a legitimate update process. |
bp-core/bp-core-update.php: bp_version_bump() |
Update the BP version stored in the database to the current version. |
bp-core/bp-core-update.php: bp_version_updater() |
Initialize an update or installation of BuddyPress. |
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_import_users() |
Importer engine – USERS |
bp-core/bp-core-tools-default-data.php: bp_dd_import_users_profile() |
Import extended profile fields. |
bp-core/bp-core-tools-default-data.php: bp_dd_import_users_messages() |
Import private messages between users. |
bp-core/bp-core-tools-default-data.php: bp_dd_import_groups() |
Importer engine – GROUPS |
bp-core/profile-search/bps-start.php: bp_profile_search_add_main_form() |
Add BuddyBoss Profile Search form. |
bp-core/classes/class-bp-admin-tab.php: BP_Admin_Tab::settings_save() |
Method to save the fields |
bp-core/classes/class-bp-admin-setting-tab.php: BP_Admin_Setting_tab::settings_save_lagecy() | |
bp-core/bp-core-functions.php: bp_core_update_directory_page_ids() |
Store the list of BP directory pages in the appropriate meta table. |
bp-core/bp-core-functions.php: bp_core_add_page_mappings() |
Creates necessary directory pages. |
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_activity_favorites_upgrade_data() |
Check if BuddyPress activity favorites data needs upgrade & Update to BuddyBoss activity like data |
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.