Filter
rp_default_fooditems_name
On this page
Filters the default singular and plural labels for menu items.
Returns an array with singular and plural keys, 'Menu Item' and 'Menu Items' by default. Use it to rename the labels used by the plugin.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$defaults | array | Array with singular and plural labels. |
Return value#
array. Array with singular and plural labels.
Example#
function my_fooditem_labels( $defaults ) {
$defaults['singular'] = __( 'Dish', 'my-textdomain' );
$defaults['plural'] = __( 'Dishes', 'my-textdomain' );
return $defaults;
}
add_filter( 'rp_default_fooditems_name', 'my_fooditem_labels' );
Source#
Applied in:
includes/rp-core-functions.php(line 2793), inrp_get_default_labels()
Was this page helpful?
