acf_field_taxonomy::ajax_query
Returns AJAX results for the Taxonomy field.
Метод класса: acf_field_taxonomy{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$acf_field_taxonomy = new acf_field_taxonomy(); $acf_field_taxonomy->ajax_query();
Список изменений
| С версии 5.0.0 | Введена. |
Код acf_field_taxonomy::ajax_query() acf field taxonomy::ajax query ACF 6.4.2
public function ajax_query() {
$nonce = acf_request_arg( 'nonce', '' );
$key = acf_request_arg( 'field_key', '' );
$conditional_logic = (bool) acf_request_arg( 'conditional_logic', false );
if ( $conditional_logic ) {
if ( ! acf_current_user_can_admin() ) {
die();
}
// Use the standard ACF admin nonce.
$nonce = '';
$key = '';
}
if ( ! acf_verify_ajax( $nonce, $key, ! $conditional_logic ) ) {
die();
}
acf_send_ajax_results( $this->get_ajax_query( $_POST ) );
}