Filter: bricks/query/run_fake
Defines the results of a “fake” query execution for custom or unsupported query types. This is used when calculating filter counts or other logic that requires querying all potential results without pagination.
Parameters
Section titled “Parameters”$results(array): The query results array (default[]).$query(object): The Bricks Query instance.
Example usage
Section titled “Example usage”add_filter( 'bricks/query/run_fake', function( $results, $query ) { // Example: Provide all results for a custom 'my_api' query type if ( $query->object_type === 'my_api' ) { // Fetch all IDs from your API return [ 1, 2, 3, 4, 5 ]; }
return $results;}, 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.