ACF\Pro\Fields\FlexibleContent
Render::render
Renders the Flexible Content field.
Метод класса: Render{}
Хуков нет.
Возвращает
void. Ничего (null).
Использование
$Render = new Render(); $Render->render();
Список изменений
| С версии 6.5 | Введена. |
Код Render::render() Render::render 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.
}