Filter: bricks/assets/generate_css_from_element
This filter allows you to include your custom query loop supported element to generate the children styles in Bricks. (@since 1.9.2)
Parameters
Section titled “Parameters”$element_names(array): Additional loop-capable element names. Defaults to an empty array.$current_element(array): The element currently being processed for CSS generation.$css_type(string): The CSS generation area, such asheader,footer, orcontent.
add_filter( 'bricks/assets/generate_css_from_element', function( $element_names, $current_element, $css_type ) { // $css_type is a string (e.g. header, footer, content, etc.) // Add your custom element name so the looping children styles are generated. if ( ! in_array( 'my-custom-element-name', $element_names ) ) { $element_names[] = 'my-custom-element-name'; }
return $element_names;}, 10, 3 );Was this helpful?
A quick vote and short notes help us improve these docs faster.
Leave a note for us
Please do not include passwords, license keys, or personal data. We store submitted notes to improve the docs.
Thanks for sharing feedback. We're using it to improve these docs.