acf_field_gallery::render_field_presentation_settings()publicACF 6.0

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

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

Хуков нет.

Возвращает

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

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

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

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

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

Код acf_field_gallery::render_field_presentation_settings() ACF 6.0.4

function render_field_presentation_settings( $field ) {
	acf_render_field_setting(
		$field,
		array(
			'label'        => __( 'Insert', 'acf' ),
			'instructions' => __( 'Specify where new attachments are added', 'acf' ),
			'type'         => 'select',
			'name'         => 'insert',
			'choices'      => array(
				'append'  => __( 'Append to the end', 'acf' ),
				'prepend' => __( 'Prepend to the beginning', 'acf' ),
			),
		)
	);

	acf_render_field_setting(
		$field,
		array(
			'label'        => __( 'Preview Size', 'acf' ),
			'instructions' => '',
			'type'         => 'select',
			'name'         => 'preview_size',
			'choices'      => acf_get_image_sizes(),
		)
	);
}