ACF\Pro\Blocks

Bindings_Editor::enqueue_block_editor_assetspublicACF 1.0

Enqueues the JS block bindings source script on block editor screens.

Method of the class: Bindings_Editor{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

Bindings_Editor::enqueue_block_editor_assets() code ACF 6.8.8

public function enqueue_block_editor_assets() {
	if ( ! acf_get_setting( 'enable_block_bindings' ) ) {
		return;
	}

	// JS bindings layer requires the datastore for live editor preview/editing.
	if ( ! acf_is_using_datastore() ) {
		return;
	}

	wp_enqueue_script( 'acf-field-bindings' );
}