acf_field_flexible_content::prepare_field_for_export
Handles preparing the layouts for export.
Метод класса: acf_field_flexible_content{}
Хуков нет.
Возвращает
Массив. The export ready field array.
Использование
$acf_field_flexible_content = new acf_field_flexible_content(); $acf_field_flexible_content->prepare_field_for_export( $field );
- $field(массив) (обязательный)
- The whole fiel array.
Список изменений
| С версии 5.0.0 | Введена. |
Код acf_field_flexible_content::prepare_field_for_export() acf field flexible content::prepare field for export ACF 6.4.2
public function prepare_field_for_export( $field ) {
// loop
if ( ! empty( $field['layouts'] ) ) {
foreach ( $field['layouts'] as &$layout ) {
$layout['sub_fields'] = acf_prepare_fields_for_export( $layout['sub_fields'] );
}
}
// return
return $field;
}