Filter: bricks/users/query_vars
Bricks users query variables can be manipulated before the query runs like so:
add_filter( 'bricks/users/query_vars', function( $query_vars, $settings, $element_id, $element_name ) { $query_vars['exclude'] = [ 2, 5 ]; // Exclude users id 2 and 5
return $query_vars;}, 10, 4 );The filter callback receives three arguments:
$query_varsan associative array used to feed the WP_User_Query class$settingsan associative array containing the element settings set in the builder$element_idis a string containing the unique element ID$element_nameis a string containing the element name (@since 1.11.1)
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.