wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_load_core_site_options › WordPress Function

Seit3.0.0
Veraltetn/v
wp_load_core_site_options ( $network_id = null )
Parameter:
  • (int) $network_id Optional site ID for which to query the options. Defaults to the current site.
    Erforderlich: Nein
    Standard: null
Definiert in:
Codex:
Changelog:
  • 6.1.0

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



Quellcode

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 );
}