wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_load_core_site_options › WordPress Function

Since3.0.0
Deprecatedn/a
wp_load_core_site_options ( $network_id = null )
Parameters:
  • (int) $network_id Optional site ID for which to query the options. Defaults to the current site.
    Required: No
    Default: null
Defined at:
Codex:
Change Log:
  • 6.1.0

Loads and caches certain often requested site options if is_multisite() and a persistent cache is not being used.



Source

function wp_load_core_site_options( $network_id = null ) {
	if ( ! is_multisite() || wp_installing() ) {
		return;
	}

	if ( empty( $network_id ) ) {
		$network_id = get_current_network_id();
	}

	update_meta_cache( 'site', $network_id );
}