Filter: bricks/conditions/options
Filters the condition options available in the element conditions interface. This allows you to add custom conditions that users can select to control element visibility.
Parameters
Section titled “Parameters”$options(array): Array of condition options. Each option defines the condition key, label, group, comparison operators, and value input type.
Example usage
Section titled “Example usage”add_filter( 'bricks/conditions/options', function( $options ) { // Add a custom 'Is Weekend' condition $options[] = [ 'key' => 'is_weekend', 'group' => 'other', // Or a custom group created via bricks/conditions/groups 'label' => esc_html__( 'Is Weekend', 'my-plugin' ), 'compare' => [ 'type' => 'select', 'options' => [ '==' => esc_html__( 'is', 'bricks' ), ], ], 'value' => [ 'type' => 'select', 'options' => [ 'true' => esc_html__( 'True', 'bricks' ), 'false' => esc_html__( 'False', 'bricks' ), ], ], ];
return $options;} );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.