Filter
rp_food_item_list_extra_classes
On this page
Filters the extra CSS classes added to an add-on row in the menu item popup.
Runs for each add-on item inside an add-on group when the popup is rendered. The classes are joined with spaces and added to the add-on row element.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$classes | array | List of class names; empty by default. |
$child_addon | int | Term ID of the add-on item. |
Return value#
array. The list of class names.
Example#
function my_addon_row_classes( $classes, $child_addon ) {
$classes[] = 'my-addon-' . absint( $child_addon );
return $classes;
}
add_filter( 'rp_food_item_list_extra_classes', 'my_addon_row_classes', 10, 2 );
Source#
Applied in:
includes/rp-ajax-functions.php(line 314), inget_fooditem_lists()
See also#
Was this page helpful?
