Filter: bricks_query_max_items_in_builder
Filters dynamic query results in the builder when Bricks applies the builder query max-results limit.
Bricks handles built-in post, term, user, and supported provider object types internally. This filter runs for custom query object types that Bricks does not know how to trim itself.
Parameters
Section titled “Parameters”$result(mixed): The current query result.$query_instance(Bricks\Query): The Bricks query instance.$builder_query_max_results(int): The maximum number of results Bricks allows in the builder.
Example usage
Section titled “Example usage”add_filter( 'bricks_query_max_items_in_builder', function( $result, $query_instance, $builder_query_max_results ) { if ( is_array( $result ) ) { return array_slice( $result, 0, $builder_query_max_results ); }
return $result;}, 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.