acf_switch_stores()
acf_switch_stores
Triggered when switching between sites on a multisite installation.
Хуков нет.
Возвращает
null. Ничего (null).
Использование
acf_switch_stores( $site_id, $prev_site_id );
- $site_id(int) (обязательный)
- New blog ID.
- $prev_site_id(обязательный)
- .
Список изменений
| С версии 5.7.11 | Введена. |
Код acf_switch_stores() acf switch stores ACF 6.4.2
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 );
}
}