ACF_Media::__construct()publicACF 5.0.0

Constructor.

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

Хуков нет.

Возвращает

null. Ничего.

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

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

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

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

Код ACF_Media::__construct() ACF 5.10.2

public function __construct() {

	// Localize media strings.
	add_action( 'acf/enqueue_scripts', array( $this, 'enqueue_scripts' ) );

	// Save files uploaded from basic `$_FILE` field.
	add_action( 'acf/save_post', array( $this, 'save_files' ), 5, 1 );

	// Hook into Media Upload to run additional logic.
	add_filter( 'wp_handle_upload_prefilter', array( $this, 'handle_upload_prefilter' ), 10, 1 );

	// Hook into Media Modal Query to run additional logic.
	add_action( 'wp_ajax_query-attachments', array( $this, 'wp_ajax_query_attachments' ), -1 );
}