acf_field_flexible_content::get_valid_layout
This function will fill in the missing keys to create a valid layout
Метод класса: acf_field_flexible_content{}
Хуков нет.
Возвращает
$layout. (array)
Использование
$acf_field_flexible_content = new acf_field_flexible_content(); $acf_field_flexible_content->get_valid_layout( $layout );
- $layout
- .
По умолчанию: array()
Список изменений
| С версии 1.1.0 | Введена. |
Код acf_field_flexible_content::get_valid_layout() acf field flexible content::get valid layout ACF 6.4.2
function get_valid_layout( $layout = array() ) {
// parse
$layout = wp_parse_args(
$layout,
array(
'key' => uniqid( 'layout_' ),
'name' => '',
'label' => '',
'display' => 'block',
'sub_fields' => array(),
'min' => '',
'max' => '',
)
);
// return
return $layout;
}