acf_field__group::render_field_settings()publicACF 3.6

Create extra options for your field. This is rendered when editing a field. The value of $field['name'] can be used (like bellow) to save extra data to the $field

@type action

{} Это метод класса: acf_field__group{}

Хуков нет.

Возвращает

null. Ничего.

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

$acf_field__group = new acf_field__group();
$acf_field__group->render_field_settings( $field );
$field (обязательный)
-

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

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

Код acf_field__group::render_field_settings() ACF 5.10.2

<?php
function render_field_settings( $field ) {

	// vars
	$args = array(
		'fields' => $field['sub_fields'],
		'parent' => $field['ID'],
	);

	?>
<tr class="acf-field acf-field-setting-sub_fields" data-setting="group" data-name="sub_fields">
	<td class="acf-label">
		<label><?php _e( 'Sub Fields', 'acf' ); ?></label>	
	</td>
	<td class="acf-input">
		<?php

		acf_get_view( 'field-group-fields', $args );

		?>
	</td>
</tr>
	<?php

	// layout
	acf_render_field_setting(
		$field,
		array(
			'label'        => __( 'Layout', 'acf' ),
			'instructions' => __( 'Specify the style used to render the selected fields', 'acf' ),
			'type'         => 'radio',
			'name'         => 'layout',
			'layout'       => 'horizontal',
			'choices'      => array(
				'block' => __( 'Block', 'acf' ),
				'table' => __( 'Table', 'acf' ),
				'row'   => __( 'Row', 'acf' ),
			),
		)
	);

}