acf_field_gallery::render_field_presentation_settingspublicACF 6.0

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

Method of the class: acf_field_gallery{}

No Hooks.

Returns

null. Nothing (null).

Usage

$acf_field_gallery = new acf_field_gallery();
$acf_field_gallery->render_field_presentation_settings( $field );
$field(array) (required)
The field settings array.

Changelog

Since 6.0 Introduced.

acf_field_gallery::render_field_presentation_settings() code 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(),
		)
	);
}