wp_load_core_site_options()
Loads and primes caches of certain often requested network options if is_multisite().
Хуков нет.
Возвращает
null. Ничего (null).
Использование
wp_load_core_site_options( $network_id );
- $network_id(int)
- Network ID of network for which to prime network options cache.
По умолчанию:current network
Список изменений
| С версии 3.0.0 | Введена. |
| С версии 6.3.0 | Also prime caches for network options when persistent object cache is enabled. |
| С версии 6.6.0 | Uses wp_prime_network_option_caches(). |
Код wp_load_core_site_options() wp load core site options WP 6.9.4
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 );
}