Filter
rpress_fooditem_allergen_traces
On this page
Filters the allergens a menu item may contain traces of.
Returned by rpress_get_fooditem_allergen_traces(). Traces come from the item's stored trace term IDs, minus any allergen the item already contains, fetched ordered by name.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$terms | WP_Term[] | Allergen terms marked as traces. |
$fooditem_id | int | Menu item (fooditem) ID. |
Return value#
WP_Term[]. Allergen terms.
Example#
add_filter( 'rpress_fooditem_allergen_traces', 'my_fooditem_allergen_traces', 10, 2 );
function my_fooditem_allergen_traces( $terms, $fooditem_id ) {
return $terms;
}
Source#
Applied in:
includes/features/allergens/functions.php(line 74), inrpress_get_fooditem_allergen_traces()
See also#
Was this page helpful?
