From b909bb1cf015074c5f46a0d56b55f37af2b18db7 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Fri, 12 Feb 2010 20:23:06 +0000 Subject: [PATCH] Add can_compress_scripts to core site options. Add phpdoc for wp_load_core_site_options(). see #11644 git-svn-id: https://develop.svn.wordpress.org/trunk@13069 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 6aee150c6e..fb8f7c7164 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -437,6 +437,15 @@ function wp_load_alloptions() { return $alloptions; } +/** + * Loads and caches certain often requested site options if is_multisite() and a peristent cache is not being used. + * + * @since 3.0.0 + * @package WordPress + * @subpackage Option + * + * @param int $site_id Optional site ID for which to query the options. Defaults to the current site. + */ function wp_load_core_site_options( $site_id = null ) { global $wpdb, $_wp_using_ext_object_cache; @@ -446,7 +455,7 @@ function wp_load_core_site_options( $site_id = null ) { if ( empty($site_id) ) $site_id = $wpdb->siteid; - $core_options = array('site_name', 'siteurl', 'active_sitewide_plugins', '_site_transient_timeout_theme_roots', '_site_transient_theme_roots', 'site_admins', 'dashboard_blog'); + $core_options = array('site_name', 'siteurl', 'active_sitewide_plugins', '_site_transient_timeout_theme_roots', '_site_transient_theme_roots', 'site_admins', 'dashboard_blog', 'can_compress_scripts'); $core_options_in = "'" . implode("', '", $core_options) . "'"; $options = $wpdb->get_results( $wpdb->prepare("SELECT meta_key, meta_value FROM $wpdb->sitemeta WHERE meta_key IN ($core_options_in) AND site_id = %d", $site_id) );