Skip to content

Developer Filters

All filters live in the global namespace and follow the gbqe_* prefix.

Modifies sanitized WP_User_Query arguments before the query runs.

add_filter( 'gbqe_users_query_args', function ( $args, $query, $attributes, $block ) {
$args['role__not_in'] = array( 'administrator' );
return $args;
}, 10, 4 );

Parameters: $args, $query, $attributes, $block.

Modifies sanitized get_terms() arguments before the query runs.

add_filter( 'gbqe_terms_query_args', function ( $args, $query, $attributes, $block ) {
$args['exclude'] = array( 123 );
return $args;
}, 10, 4 );

Parameters: $args, $query, $attributes, $block.

Caps the maximum number of items a single Users or Terms query may return.

add_filter( 'gbqe_max_query_number', fn () => 200 );

Filters the resolved value of any GB Query Extensions dynamic tag.

Filters the link URL produced by a dynamic tag.

Whitelist additional user meta keys for public output contexts.

add_filter( 'gbqe_user_meta_public_keys', function ( $keys ) {
$keys[] = 'twitter_handle';
return $keys;
} );

Customize who can read PII fields (email, etc).

add_filter( 'gbqe_can_view_user_pii', function ( $can, $user_id ) {
return current_user_can( 'edit_users' );
}, 10, 2 );

Change the term meta key resolved by the term thumbnail dynamic tag.

add_filter( 'gbqe_term_thumbnail_meta_key', fn () => 'category_image_id' );

Fallback taxonomy used when the editor renders the Terms Query preview without a saved selection.

Fallback term ID used by the same preview.