Action: bricks/generate_css_file
If your CSS loading method is set to External files, this hook will be triggered when a CSS file is generated in Bricks. Developers can use this hook to trigger other actions related to CSS file generation. Itβs useful for instructing a cache plugin to clear the cache when a CSS file is generated. (@since 1.9.5)
/** * $type : 'global-color-palettes' | 'global-elements' | 'theme-styles' | 'global-custom-css' | 'post' * $file_name : The generated CSS file name*/add_action( 'bricks/generate_css_file', function( $type, $file_name ) { error_log( 'Generated CSS file: ' . $type . ' - ' . $file_name );}, 10, 2 );Parameters:
$type(string): Possible stringsglobal-color-palettesglobal-elementstheme-stylesglobal-custom-csspost$file_name(string): The generated CSS file name
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.