Filter
rpress_show_dietary_labels
On this page
Filters whether dietary labels are displayed for a menu item.
Runs at the start of rpress_get_dietary_labels_html(). Return false to output nothing, either for every item or for specific menu items.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$show | bool | Default true. |
$fooditem_id | int | Menu item ID. |
Return value#
bool. False to hide dietary labels.
Example#
function my_hide_dietary_labels( $show, $fooditem_id ) {
return false;
}
add_filter( 'rpress_show_dietary_labels', 'my_hide_dietary_labels', 10, 2 );
Source#
Applied in:
includes/template-functions.php(line 1215), inrpress_get_dietary_labels_html()
See also#
Was this page helpful?
