ACF_WPML_Compatibility::verify_ajax()
verify_ajax
Sets the correct language during AJAX requests.
@type function
{} Это метод класса: ACF_WPML_Compatibility{}
Хуков нет.
Возвращает
null
. Ничего.
Использование
$ACF_WPML_Compatibility = new ACF_WPML_Compatibility(); $ACF_WPML_Compatibility->verify_ajax();
Список изменений
С версии 5.2.3 | Введена. |
Код ACF_WPML_Compatibility::verify_ajax() ACF WPML Compatibility::verify ajax ACF 5.10.2
function verify_ajax() { // set the language for this AJAX request // this will allow get_posts to work as expected (load posts from the correct language) if ( isset( $_REQUEST['lang'] ) ) { global $sitepress; $sitepress->switch_lang( $_REQUEST['lang'] ); } }