acf_field_page_link::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_page_link{}

Хуков нет.

Возвращает

null. Ничего.

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

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

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

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

Код acf_field_page_link::render_field_settings() ACF 5.10.2

function render_field_settings( $field ) {

	// post_type
	acf_render_field_setting(
		$field,
		array(
			'label'        => __( 'Filter by Post Type', 'acf' ),
			'instructions' => '',
			'type'         => 'select',
			'name'         => 'post_type',
			'choices'      => acf_get_pretty_post_types(),
			'multiple'     => 1,
			'ui'           => 1,
			'allow_null'   => 1,
			'placeholder'  => __( 'All post types', 'acf' ),
		)
	);

	// taxonomy
	acf_render_field_setting(
		$field,
		array(
			'label'        => __( 'Filter by Taxonomy', 'acf' ),
			'instructions' => '',
			'type'         => 'select',
			'name'         => 'taxonomy',
			'choices'      => acf_get_taxonomy_terms(),
			'multiple'     => 1,
			'ui'           => 1,
			'allow_null'   => 1,
			'placeholder'  => __( 'All taxonomies', 'acf' ),
		)
	);

	// allow_null
	acf_render_field_setting(
		$field,
		array(
			'label'        => __( 'Allow Null?', 'acf' ),
			'instructions' => '',
			'name'         => 'allow_null',
			'type'         => 'true_false',
			'ui'           => 1,
		)
	);

	// allow_archives
	acf_render_field_setting(
		$field,
		array(
			'label'        => __( 'Allow Archives URLs', 'acf' ),
			'instructions' => '',
			'name'         => 'allow_archives',
			'type'         => 'true_false',
			'ui'           => 1,
		)
	);

	// multiple
	acf_render_field_setting(
		$field,
		array(
			'label'        => __( 'Select multiple values?', 'acf' ),
			'instructions' => '',
			'name'         => 'multiple',
			'type'         => 'true_false',
			'ui'           => 1,
		)
	);

}