acf_form_attachment::admin_enqueue_scripts()publicACF 3.6.0

admin_enqueue_scripts

This action is run after post query but before any admin script / head actions. It is a good place to register all actions.

@type    action (admin_enqueue_scripts)

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

Хуков нет.

Возвращает

N/A.

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

$acf_form_attachment = new acf_form_attachment();
$acf_form_attachment->admin_enqueue_scripts();

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

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

Код acf_form_attachment::admin_enqueue_scripts() ACF 5.10.2

function admin_enqueue_scripts() {

	// bail early if not valid screen
	if ( ! acf_is_screen( array( 'attachment', 'upload' ) ) ) {
		return;
	}

	// load acf scripts
	acf_enqueue_scripts(
		array(
			'uploader' => true,
		)
	);

	// actions
	if ( acf_is_screen( 'upload' ) ) {
		add_action( 'admin_footer', array( $this, 'admin_footer' ), 0 );
	}
}