ACF\Pro\Fields\FlexibleContent

Render::renderpublicACF 6.5

Renders the Flexible Content field.

Method of the class: Render{}

No Hooks.

Returns

null. Nothing (null).

Usage

$Render = new Render();
$Render->render();

Changelog

Since 6.5 Introduced.

Render::render() code ACF 6.8.8

public function render() {
	$div_attrs = array(
		'class'             => 'acf-flexible-content',
		'data-min'          => $this->field['min'],
		'data-max'          => $this->field['max'],
		'data-button-label' => $this->field['button_label'],
		'data-nonce'        => wp_create_nonce( 'acf_field_' . $this->field['type'] . '_' . $this->field['key'] ),
	);

	if ( empty( $this->field['value'] ) ) {
		$div_attrs['class'] .= ' -empty';
	}

	echo '<div ' . acf_esc_attrs( $div_attrs ) . '>'; // Main wrapper div.

	acf_hidden_input( array( 'name' => $this->field['name'] ) );

	$this->actions( 'top' );
	$this->no_value_message();
	$this->clones();
	$this->layouts();
	$this->actions( 'bottom' );
	$this->add_layout_menu();
	$this->more_layout_actions();

	echo '</div>'; // End main wrapper div.
}