Filter: bricks/query/run_fake
Filter: bricks/query/run_fake
Section titled “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 page helpful?