Filter: bricks/theme_styles
Filter: bricks/theme_styles
Section titled “Filter: bricks/theme_styles”Filters the array of Theme Styles loaded from the database. This allows you to modify, add, or remove Theme Styles programmatically.
Parameters
Section titled “Parameters”$styles(array): Associative array of Theme Styles, where the key is the style name and the value is an array of style data.
Example usage
Section titled “Example usage”add_filter( 'bricks/theme_styles', function( $styles ) { // Example: Add a default property to all theme styles foreach ( $styles as $key => $style ) { if ( ! isset( $styles[ $key ]['settings']['typography'] ) ) { $styles[ $key ]['settings']['typography'] = [ 'font-size' => '16px' ]; } }
return $styles;} ); Was this page helpful?