wp_render_elements_support_styles
- %1$s is private and should not be used in themes or plugins directly.
wp_render_elements_support_styles ( $parsed_block )
Access:Parameters:- (array) parsed_block The parsed block.
Returns:- (array) The same parsed block with elements classname added if appropriate.
Defined at:Change Log: - Introduced in WordPress: 6.0.0
- Deprecated in WordPress: —
Description
Render the elements stylesheet and adds elements class name to block as required.In the case of nested blocks we want the parent element styles to be rendered before their descendants.
This solves the issue of an element (e.g.: link color) being styled in both the parent and a descendant:
we want the descendant style to take priority, and this is done by loading it after, in DOM order.