Filter: bricks/filter_element/controls
Filters the controls available for filter elements (e.g., Checkbox, Radio, Select, Range). This allows you to add, remove, or modify settings for these elements globally.
Parameters
Section titled “Parameters”$controls(array): Array of element controls.$element(object): The filter element instance.
Example usage
Section titled “Example usage”add_filter( 'bricks/filter_element/controls', function( $controls, $element ) { // Add a custom control to all filter elements $controls['my_custom_setting'] = [ 'tab' => 'content', 'group' => 'filter', 'label' => esc_html__( 'My Custom Setting', 'my-plugin' ), 'type' => 'checkbox', ];
return $controls;}, 10, 2 );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.