benecaster_donor_wall_query_args
Fires immediately before the donor wall queries its donation rows. Exposes the seven query parameters as a mutable associative array — return the array with any keys changed to alter the query.
Available keys: show_id (int), page (int), per_page (int), platform (string|null), date_from (string|null — ISO 8601 date), date_to (string|null — ISO 8601 date), orderby (string).
per_page flows into pagination. Overriding per_page here updates both the query and the “Page N of M” strip — the shortcode recomputes total pages from the effective value the filter returns, not from the raw shortcode attribute.
Branch on $show_id for per-show behavior. The filter fires for every shortcode instance. Return the args unchanged for shows that should use the default query, and apply your override only for the targeted show ID.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$args |
array |
— | Associative array of query parameters with keys: show_id, page, per_page, platform, date_from, date_to, orderby. |
$show_id |
int |
— | WordPress post ID of the show being queried. |
Returns:
array
Examples
Restrict to Stripe donations on one show
add_filter( 'benecaster_donor_wall_query_args', function ( array $args, int $show_id ): array {
if ( 42 !== $show_id ) {
return $args;
}
$args['platform'] = 'stripe';
return $args;
}, 10, 2 );
Override page size to 5 per page
add_filter( 'benecaster_donor_wall_query_args', function ( array $args, int $show_id ): array {
$args['per_page'] = 5;
return $args;
} );
Need this built rather than just documented? See our services →