ACF\AI\Abilities
FieldGroup::get_field_groups
Callback for the "acf/get-field-groups" ability.
Метод класса: FieldGroup{}
Хуков нет.
Возвращает
array.
Использование
$FieldGroup = new FieldGroup(); $FieldGroup->get_field_groups( $input );
- $input(массив)
- Ability input (unused).
По умолчанию:array()
Список изменений
| С версии 6.8.0 | Введена. |
Код FieldGroup::get_field_groups() FieldGroup::get field groups ACF 6.8.8
public function get_field_groups( $input = array() ) {
unset( $input ); // Not used, but required by interface.
$field_groups = $this->get_ai_accessible_field_groups();
$count = count( $field_groups );
return array(
'field_groups' => $field_groups,
'count' => $count,
'message' => sprintf(
/* translators: %d: Number of found field groups */
_n( 'Found %d ACF field group.', 'Found %d ACF field groups.', $count, 'acf' ),
$count
),
);
}