ACF_Media::wp_ajax_query_attachments │ public │ ACF 5.2.3

Fires during the WP Modal Query AJAX call.

Method of the class: ACF_Media{}

No Hooks.

Returns

void. Nothing (null).

Usage

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

Changelog

Since 5.2.3 Introduced.

ACF_Media::wp_ajax_query_attachments() code ACF 6.8.8

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 );
	}
}