ACF_Form_Gutenberg::enqueue_block_editor_assets()publicACF 5.8.0

enqueue_block_editor_assets

Allows a safe way to customize Guten-only functionality.

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

Хуков нет.

Возвращает

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

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

$ACF_Form_Gutenberg = new ACF_Form_Gutenberg();
$ACF_Form_Gutenberg->enqueue_block_editor_assets();

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

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

Код ACF_Form_Gutenberg::enqueue_block_editor_assets() ACF 6.0.4

function enqueue_block_editor_assets() {

	// Remove edit_form_after_title.
	add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ), 20, 0 );

	// Call edit_form_after_title manually.
	add_action( 'block_editor_meta_box_hidden_fields', array( $this, 'block_editor_meta_box_hidden_fields' ) );

	// Customize editor metaboxes.
	add_filter( 'filter_block_editor_meta_boxes', array( $this, 'filter_block_editor_meta_boxes' ) );

	// Trigger ACF enqueue scripts as the site editor doesn't trigger this from form-post.php
	acf_enqueue_scripts(
		array(
			'uploader' => true,
		)
	);
}