Skip to content
Docs
Get RestroPress

Filter

rpress_dietary_labels

Updated
On this page

Filters the labels of the dietary label taxonomy.

Runs while the menu taxonomies are registered on init, when the arguments for the dietary label taxonomy are built. The array holds the standard taxonomy label keys such as 'name', 'singular_name', 'add_new_item' and 'menu_name'.

Parameters#

ParameterTypeDescription
$dietary_labelsarrayLabel key => translated string.

Return value#

array. The labels array.

Example#

add_filter( 'rpress_dietary_labels', 'my_dietary_labels', 10, 1 );
function my_dietary_labels( $dietary_labels ) {
	$dietary_labels['menu_name'] = __( 'My label', 'my-plugin' );
	return $dietary_labels;
}

Source#

Applied in:

  • includes/post-types.php (line 279), in rpress_setup_fooditem_taxonomies()

See also#

Was this page helpful?