Filter: bricks/query_filters_indexer/validate_job_settings
Validates the settings of a filter job before the Query Filters Indexer processes it. This is used for unknown or custom filter sources to ensure they have the necessary configuration.
Parameters
Section titled “Parameters”$validate(bool): Whether the settings are valid. Default isfalsefor unknown sources.$filter_source(string): The source of the filter data (e.g.,wcField,customSource).$filter_settings(array): The settings of the filter element.
Example usage
Section titled “Example usage”add_filter( 'bricks/query_filters_indexer/validate_job_settings', function( $validate, $filter_source, $filter_settings ) { // Validate settings for a custom source if ( $filter_source === 'my_custom_source' ) { // Check if required 'my_key' setting is present return ! empty( $filter_settings['my_key'] ); }
return $validate;}, 10, 3 );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.