Filter
rpress_fooditem_types
On this page
Filters the available menu item types.
Runs in rpress_get_fooditem_types. The default array has the keys 0 (Default) and bundle (Bundle), with translated labels as values. Core does not call this function elsewhere, so the list is mainly useful for extensions that read it.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$types | array | Item types keyed by slug with display labels as values. |
Return value#
array. The item types.
Example#
function my_fooditem_types( $types ) {
$types['combo'] = __( 'Combo', 'my-plugin' );
return $types;
}
add_filter( 'rpress_fooditem_types', 'my_fooditem_types', 10, 1 );
Source#
Applied in:
includes/fooditem-functions.php(line 467), inrpress_get_fooditem_types()
See also#
Was this page helpful?
