wp_get_layout_child_values()WP 7.1.0

Returns the child-layout-only subset of a layout object.

No Hooks.

Returns

array. Child layout values, or an empty array.

Usage

wp_get_layout_child_values( $layout );
$layout(mixed) (required)
Layout object.

Changelog

Since 7.1.0 Introduced.

wp_get_layout_child_values() code WP 7.1

function wp_get_layout_child_values( $layout ) {
	if ( ! is_array( $layout ) ) {
		return array();
	}

	return array_intersect_key(
		$layout,
		array_flip( array( 'selfStretch', 'flexSize', 'columnStart', 'columnSpan', 'rowStart', 'rowSpan' ) )
	);
}