acf_field_flexible_content::get_valid_layout
get_valid_layout
This function will fill in the missing keys to create a valid layout
Method of the class: acf_field_flexible_content{}
No Hooks.
Returns
$layout. (array)
Usage
$acf_field_flexible_content = new acf_field_flexible_content(); $acf_field_flexible_content->get_valid_layout( $layout );
- $layout
- .
Default:array()
Changelog
| Since 1.1.0 | Introduced. |
acf_field_flexible_content::get_valid_layout() acf field flexible content::get valid layout code ACF 6.0.4
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;
}