acf_field_textarea::render_field_presentation_settings()
Renders the field settings used in the "Presentation" tab.
Метод класса: acf_field_textarea{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$acf_field_textarea = new acf_field_textarea(); $acf_field_textarea->render_field_presentation_settings( $field );
- $field(массив) (обязательный)
- The field settings array.
Список изменений
С версии 6.0 | Введена. |
Код acf_field_textarea::render_field_presentation_settings() acf field textarea::render field presentation settings ACF 6.0.4
function render_field_presentation_settings( $field ) { acf_render_field_setting( $field, array( 'label' => __( 'Rows', 'acf' ), 'instructions' => __( 'Sets the textarea height', 'acf' ), 'type' => 'number', 'name' => 'rows', 'placeholder' => 8, ) ); acf_render_field_setting( $field, array( 'label' => __( 'Placeholder Text', 'acf' ), 'instructions' => __( 'Appears within the input', 'acf' ), 'type' => 'text', 'name' => 'placeholder', ) ); acf_render_field_setting( $field, array( 'label' => __( 'New Lines', 'acf' ), 'instructions' => __( 'Controls how new lines are rendered', 'acf' ), 'type' => 'select', 'name' => 'new_lines', 'choices' => array( 'wpautop' => __( 'Automatically add paragraphs', 'acf' ), 'br' => __( 'Automatically add <br>', 'acf' ), '' => __( 'No Formatting', 'acf' ), ), ) ); }