ACF_Admin_Tool_Export::html_field_selection
html_field_selection
description
Method of the class: ACF_Admin_Tool_Export{}
No Hooks.
Returns
null. Nothing (null).
Usage
$ACF_Admin_Tool_Export = new ACF_Admin_Tool_Export(); $ACF_Admin_Tool_Export->html_field_selection();
Changelog
| Since 5.6.3 | Introduced. |
ACF_Admin_Tool_Export::html_field_selection() ACF Admin Tool Export::html field selection code 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,
)
);
}