_acf_get_field_storage_sub_fields()
Returns a field's sub fields with their meta names in name, as the field type names them when loading.
Внутренняя функция — эта функция рассчитана на использование самим ядром. Не рекомендуется использовать эту функцию в своем коде.
Хуков нет.
Возвращает
array.
Использование
_acf_get_field_storage_sub_fields( $field );
- $field(массив) (обязательный)
- The field array, with its meta name in
name.
Список изменений
| С версии 6.8.11 | Введена. |
Код _acf_get_field_storage_sub_fields() acf get field storage sub fields ACF 6.8.11
function _acf_get_field_storage_sub_fields( $field ) {
$type = (string) ( $field['type'] ?? '' );
if ( in_array( $type, array( 'group', 'clone' ), true ) ) {
return _acf_get_prepared_sub_fields( $field, $type );
}
if ( in_array( $type, array( 'repeater', 'flexible_content' ), true ) ) {
return _acf_get_row_sub_fields( $field, $type );
}
return array();
}