Skip to content
Docs
Get RestroPress

Filter

rpress_addon_category_labels

Updated
On this page

Filters the labels of the add-on group taxonomy.

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

Parameters#

ParameterTypeDescription
$category_labelsarrayLabel key => translated string.

Return value#

array. The labels array.

Example#

add_filter( 'rpress_addon_category_labels', 'my_addon_category_labels', 10, 1 );
function my_addon_category_labels( $category_labels ) {
	$category_labels['menu_name'] = __( 'My label', 'my-plugin' );
	return $category_labels;
}

Source#

Applied in:

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

See also#

Was this page helpful?