Skip to content
Docs
Get RestroPress

Filter

rpress_show_dietary_labels

Updated
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#

ParameterTypeDescription
$showboolDefault true.
$fooditem_idintMenu 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), in rpress_get_dietary_labels_html()

See also#

Was this page helpful?