acf_field_select::ajax_querypublicACF 5.0.0

AJAX handler for getting Select field choices.

Метод класса: acf_field_select{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$acf_field_select = new acf_field_select();
$acf_field_select->ajax_query();

Список изменений

С версии 5.0.0 Введена.

Код acf_field_select::ajax_query() ACF 6.4.2

public function ajax_query() {
	$nonce = acf_request_arg( 'nonce', '' );
	$key   = acf_request_arg( 'field_key', '' );

	$is_field_key = acf_is_field_key( $key );

	// Back-compat for field settings.
	if ( ! $is_field_key ) {
		if ( ! acf_current_user_can_admin() ) {
			die();
		}

		$nonce = '';
		$key   = '';
	}

	if ( ! acf_verify_ajax( $nonce, $key, $is_field_key ) ) {
		die();
	}

	acf_send_ajax_results( $this->get_ajax_query( $_POST ) );
}