Skip to content
Docs
Get RestroPress

Filter

rp_food_item_list_extra_classes

Updated
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#

ParameterTypeDescription
$classesarrayList of class names; empty by default.
$child_addonintTerm 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), in get_fooditem_lists()

See also#

Was this page helpful?