wp_load_core_site_options( int $network_id = null )

In this article

Loads and primes caches of certain often requested network options if is_multisite() .

Parameters

$network_idintoptional
Network ID of network for which to prime network options cache. Defaults to current network.

Default:null

Source

function wp_load_core_site_options( $network_id = null ) {
	if ( ! is_multisite() || wp_installing() ) {
		return;
	}
	$core_options = array( 'site_name', 'siteurl', 'active_sitewide_plugins', '_site_transient_timeout_theme_roots', '_site_transient_theme_roots', 'site_admins', 'can_compress_scripts', 'global_terms_enabled', 'ms_files_rewriting', 'WPLANG' );

	wp_prime_network_option_caches( $network_id, $core_options );
}

Changelog

VersionDescription
6.6.0Uses wp_prime_network_option_caches() .
6.3.0Also prime caches for network options when persistent object cache is enabled.
3.0.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.