ACF_Admin_Tool_Export::html_field_selection()publicACF 5.6.3

html_field_selection

description

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

Хуков нет.

Возвращает

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

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

$ACF_Admin_Tool_Export = new ACF_Admin_Tool_Export();
$ACF_Admin_Tool_Export->html_field_selection();

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

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

Код ACF_Admin_Tool_Export::html_field_selection() ACF 6.0.4

function html_field_selection() {

	// vars
	$choices      = array();
	$selected     = $this->get_selected_keys();
	$field_groups = acf_get_field_groups();

	// loop
	if ( $field_groups ) {
		foreach ( $field_groups as $field_group ) {
			$choices[ $field_group['key'] ] = esc_html( $field_group['title'] );
		}
	}

	// render
	acf_render_field_wrap(
		array(
			'label'   => __( 'Select Field Groups', 'acf' ),
			'type'    => 'checkbox',
			'name'    => 'keys',
			'prefix'  => false,
			'value'   => $selected,
			'toggle'  => true,
			'choices' => $choices,
		)
	);

}