ACF_Media::wp_ajax_query_attachments()publicACF 5.2.3

Fires during the WP Modal Query AJAX call.

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

Хуков нет.

Возвращает

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

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

$ACF_Media = new ACF_Media();
$ACF_Media->wp_ajax_query_attachments();

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

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

Код ACF_Media::wp_ajax_query_attachments() ACF 6.0.4

function wp_ajax_query_attachments() {
	if ( $this->get_source_field() ) {
		add_filter( 'wp_prepare_attachment_for_js', array( $this, 'wp_prepare_attachment_for_js' ), 10, 3 );
		add_filter( 'image_size_names_choose', array( $this, 'image_size_names_choose' ), 10, 1 );
	} else {
		add_filter( 'wp_prepare_attachment_for_js', array( $this, 'clear_acf_errors_for_core_requests' ), 5, 3 );
	}
}