acf_field_checkbox::render_field_presentation_settings()publicACF 6.0

Renders the field settings used in the "Presentation" tab.

Метод класса: acf_field_checkbox{}

Хуков нет.

Возвращает

null. Ничего (null).

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

$acf_field_checkbox = new acf_field_checkbox();
$acf_field_checkbox->render_field_presentation_settings( $field );
$field(массив) (обязательный)
The field settings array.

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

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

Код acf_field_checkbox::render_field_presentation_settings() ACF 6.0.4

function render_field_presentation_settings( $field ) {
	acf_render_field_setting(
		$field,
		array(
			'label'        => __( 'Layout', 'acf' ),
			'instructions' => '',
			'type'         => 'radio',
			'name'         => 'layout',
			'layout'       => 'horizontal',
			'choices'      => array(
				'vertical'   => __( 'Vertical', 'acf' ),
				'horizontal' => __( 'Horizontal', 'acf' ),
			),
		)
	);

	acf_render_field_setting(
		$field,
		array(
			'label'        => __( 'Add Toggle All', 'acf' ),
			'instructions' => __( 'Prepend an extra checkbox to toggle all choices', 'acf' ),
			'name'         => 'toggle',
			'type'         => 'true_false',
			'ui'           => 1,
		)
	);
}