WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

WPMU Functions/get site option

Contents

Description

Retrieve site option value based on name of option.

Please note that this is different from get_option, which retrieves an option for an individual blog. Site options are the same regardless of the current blog.

Parameters

$key
(string) (required) The name of the site option to get.
Default: None
$default
(mixed) (optional) The default value if the option is not set
Default: false
$use_cache
(mixed) (optional) Use a cached version
Default: true

$key

The following are some $key's which have been used in WordPress MU 2.8.4a

  • can_compress_scripts
  • fileupload_maxk
  • blog_list
  • site_name
  • allowedthemes
  • blog_upload_space
  • menu_items
  • add_new_users
  • mu_media_buttons
  • admin_notice_feed
  • wpmu_sitewide_plugins
  • active_sitewide_plugins
  • deactivated_sitewide_plugins
  • dashboard_blog
  • default_user_role
  • admin_email
  • registration
  • registrationnotification
  • illegal_names
  • limited_email_domains
  • banned_email_domains
  • welcome_email
  • first_post
  • upload_filetypes
  • site_admins
  • WPLANG
  • get_user_count_ts
  • user_count_ts
  • user_count
  • most_active
  • blog_count_ts
  • blog_count
  • update_plugins
  • update_themes
  • update_core
  • dismissed_update_core

Return Values

(mixed) 
Returns the value of the option requested.

Usage

<?php get_site_option($key$default$use_cache); ?>

Source File

get_site_option() is located in wp-includes/option.php.