get_site_option( string $option, mixed $default = false, bool $deprecated = true )
Retrieve an option value for the current network based on name of option.
Contents
Description #Description
See also #See also
Parameters #Parameters
- $option
-
(string) (Required) Name of option to retrieve. Expected to not be SQL-escaped.
- $default
-
(mixed) (Optional) value to return if option doesn't exist.
Default value: false
- $deprecated
-
(bool) (Optional) Whether to use cache. Multisite only. Always set to true.
Default value: true
Return #Return
(mixed) Value set for the option.
Source #Source
File: wp-includes/option.php
function get_site_option( $option, $default = false, $deprecated = true ) { return get_network_option( null, $option, $default ); }
Expand full source code Collapse full source code View on Trac
Changelog #Changelog
Version | Description |
---|---|
4.4.0 | Modified into wrapper for get_network_option() |
2.8.0 | Introduced. |
Related #Related
Uses #Uses
Uses | Description |
---|---|
wp-includes/option.php: get_network_option() |
Retrieve a network’s option value based on the option name. |
Used By #Used By
Used By | Description |
---|---|
wp-includes/class-wp-recovery-mode-cookie-service.php: WP_Recovery_Mode_Cookie_Service::recovery_mode_hash() |
Gets a form of |
wp-admin/includes/class-wp-site-health-auto-updates.php: WP_Site_Health_Auto_Updates::test_if_failed_update() |
Check if automatic updates have tried to run, but failed, previously. |
wp-admin/includes/schema.php: populate_network_meta() |
Creates WordPress network meta and sets the default values. |
wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php: WP_REST_Attachments_Controller::check_upload_size() |
Determine if uploaded file exceeds space quota on multisite. |
wp-includes/user.php: _wp_privacy_send_request_confirmation_notification() |
Notify the site administrator via email when a request is confirmed. |
wp-includes/ms-functions.php: update_network_option_new_admin_email() |
Send a confirmation request email when a change of network admin email address is attempted. |
wp-includes/ms-functions.php: wp_network_admin_email_change_notification() |
Send an email to the old network admin email address when the network admin email address changes. |
wp-includes/class-wp-theme.php: WP_Theme::network_enable_theme() |
Enables a theme for all sites on the current network. |
wp-includes/class-wp-theme.php: WP_Theme::network_disable_theme() |
Disables a theme for all sites on the current network. |
wp-includes/functions.php: _wp_upload_dir() |
A non-filtered, non-cached version of wp_upload_dir() that doesn’t check the path. |
wp-signup.php: show_blog_form() |
Generates and displays the Signup and Create Site forms |
wp-admin/includes/network.php: network_step2() |
Prints step 2 for Network installation process. |
wp-admin/includes/class-wp-automatic-updater.php: WP_Automatic_Updater::after_core_update() |
If we tried to perform a core update, check if we should send an email, and if we need to avoid processing future updates. |
wp-admin/includes/class-wp-automatic-updater.php: WP_Automatic_Updater::send_email() |
Sends an email upon the completion or failure of a background core update. |
wp-admin/includes/class-wp-automatic-updater.php: WP_Automatic_Updater::send_debug_email() |
Prepares and sends an email of a full log of background update results, useful for debugging and geekery. |
wp-admin/includes/class-wp-automatic-updater.php: WP_Automatic_Updater::send_core_update_notification_email() |
Notifies an administrator of a core update. |
wp-admin/includes/class-core-upgrader.php: Core_Upgrader::should_update_to_version() |
Determines if this WordPress Core version should update to an offered version or not. |
wp-admin/includes/class-wp-plugins-list-table.php: WP_Plugins_List_Table::prepare_items() | |
wp-admin/includes/ms.php: site_admin_notice() |
Displays an admin notice to upgrade all sites after a core upgrade. |
wp-includes/capabilities.php: grant_super_admin() |
Grants Super Admin privileges. |
wp-includes/capabilities.php: revoke_super_admin() |
Revokes Super Admin privileges. |
wp-admin/includes/ms.php: upload_is_user_over_quota() |
Check whether a site has used its allotted upload space. |
wp-admin/includes/ms.php: check_upload_size() |
Determine if uploaded file exceeds space quota. |
wp-admin/includes/ms.php: wpmu_delete_blog() |
Delete a site. |
wp-admin/includes/update.php: maintenance_nag() | |
wp-admin/includes/update.php: get_core_updates() |
Get available core updates. |
wp-admin/includes/update.php: dismiss_core_update() | |
wp-admin/includes/update.php: undismiss_core_update() | |
wp-admin/includes/dashboard.php: wp_dashboard_quota() |
Display file upload quota on dashboard. |
wp-admin/includes/upgrade.php: upgrade_network() |
Executes network-level upgrade routines. |
wp-admin/includes/upgrade.php: wp_install_defaults() |
Creates the initial content for a newly-installed site. |
wp-admin/includes/plugin.php: deactivate_plugins() |
Deactivate a single plugin or multiple plugins. |
wp-admin/includes/plugin.php: validate_active_plugins() |
Validate active plugins |
wp-admin/includes/plugin.php: is_plugin_active_for_network() |
Determines whether the plugin is active for the entire network. |
wp-admin/includes/plugin.php: activate_plugin() |
Attempts activation of plugin in a “sandbox” and redirects on success. |
wp-admin/includes/class-wp-themes-list-table.php: WP_Themes_List_Table::no_items() | |
wp-includes/capabilities.php: get_super_admins() |
Retrieve a list of super admins. |
wp-includes/capabilities.php: map_meta_cap() |
Maps meta capabilities to primitive capabilities. |
wp-includes/l10n.php: get_locale() |
Retrieves the current locale. |
wp-includes/pluggable.php: wp_salt() |
Returns a salt to add to hashes. |
wp-includes/class-wp-theme.php: WP_Theme::get_allowed_on_network() |
Returns array of stylesheet names of themes allowed on the network. |
wp-includes/functions.php: global_terms_enabled() |
Determine whether global terms are enabled. |
wp-includes/default-constants.php: wp_cookie_constants() |
Defines cookie related WordPress constants |
wp-includes/update.php: wp_version_check() |
Check WordPress version against the newest version. |
wp-includes/option.php: set_site_transient() |
Set/update the value of a site transient. |
wp-includes/option.php: get_site_transient() |
Get the value of a site transient. |
wp-includes/user.php: wp_get_user_contact_methods() |
Set up the user contact methods. |
wp-includes/ms-functions.php: get_space_allowed() |
Returns the upload quota for the current blog. |
wp-includes/ms-functions.php: get_upload_space_available() |
Determines if there is any upload space left in the current blog’s quota. |
wp-includes/ms-functions.php: is_upload_space_available() |
Determines if there is any upload space left in the current blog’s quota. |
wp-includes/ms-functions.php: upload_size_limit_filter() |
Filters the maximum upload file size allowed, in bytes. |
wp-includes/ms-functions.php: users_can_register_signup_filter() |
Check whether users can self-register, based on Network settings. |
wp-includes/ms-functions.php: wpmu_welcome_user_notification() |
Notify a user that their account activation has been successful. |
wp-includes/ms-functions.php: check_upload_mimes() |
Check an array of MIME types against a whitelist. |
wp-includes/ms-functions.php: upload_is_file_too_big() |
Check whether an upload is too big. |
wp-includes/ms-deprecated.php: install_blog() |
Install an empty blog. |
wp-includes/ms-functions.php: newblog_notify_siteadmin() |
Notifies the network admin that a new site has been activated. |
wp-includes/ms-functions.php: newuser_notify_siteadmin() |
Notifies the network admin that a new user has been activated. |
wp-includes/ms-functions.php: wpmu_welcome_notification() |
Notify a user that their blog activation has been successful. |
wp-includes/ms-functions.php: is_email_address_unsafe() |
Checks an email address against a list of banned domains. |
wp-includes/ms-functions.php: wpmu_validate_user_signup() |
Sanitize and validate data required for a user sign-up. |
wp-includes/ms-functions.php: wpmu_validate_blog_signup() |
Processes new site registrations. |
wp-includes/ms-functions.php: wpmu_signup_blog_notification() |
Send a confirmation request email to a user when they sign up for a new site. The new site will not become active until the confirmation link is clicked. |
wp-includes/ms-functions.php: wpmu_signup_user_notification() |
Send a confirmation request email to a user when they sign up for a new user account (without signing up for a site at the same time). The user account will not become active until the confirmation link is clicked. |
wp-includes/ms-load.php: wp_get_active_network_plugins() |
Returns array of network plugin files to be included in global scope. |
wp-includes/ms-load.php: ms_site_check() |
Checks status of current blog. |
wp-includes/ms-deprecated.php: get_dashboard_blog() |
Get the “dashboard blog”, the blog where users without a blog edit their profile data. |
wp-includes/ms-default-constants.php: ms_upload_constants() |
Defines Multisite upload constants. |
wp-includes/script-loader.php: script_concat_settings() |
Determine the concatenation and compression settings for scripts and styles. |
User Contributed Notes #User Contributed Notes
You must log in before being able to contribute a note or feedback.
Default Usage
Passing a Default Value