acf_switch_stores() ACF 5.7.11
Triggered when switching between sites on a multisite installation.
Хуков нет.
Возвращает
null.
Использование
acf_switch_stores( $site_id, $prev_site_id );
- $site_id(число) (обязательный)
- New blog ID.
- $prev_site_id (обязательный)
- -
Список изменений
С версии 5.7.11 | Введена. |
Код acf_switch_stores() acf switch stores ACF 5.9.1
function acf_switch_stores( $site_id, $prev_site_id ) {
// Loop over stores and call switch_site().
global $acf_stores;
foreach( $acf_stores as $store ) {
$store->switch_site( $site_id, $prev_site_id );
}
}