"Filter: bricks/theme_styles"
آرایه سبک های تم بارگیری شده از پایگاه داده را فیلتر میکند. این به شما امکان میدهد سبک های تم را به صورت برنامه ریزی شده تغییر دهید، اضافه یا حذف کنید.
پارامترها
$styles(array): Associative array of Theme Styles, where the key is the style name and the value is an array of style data.
نمونه استفاده
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;
} );