Skip to content
Docs
Get RestroPress

Filter

rpress_modal_title

Updated
On this page

Filters the title shown in the menu item popup.

Runs in the AJAX handlers that open the menu item popup (show_products, and edit_cart_fooditem when editing a cart item). The value is the menu item title and is returned in the html_title key of the response.

Parameters#

ParameterTypeDescription
$food_titlestringThe menu item title.

Return value#

string. The popup title.

Example#

function my_modal_title( $food_title ) {
	return $food_title . ' - ' . __( 'Customize', 'my-textdomain' );
}
add_filter( 'rpress_modal_title', 'my_modal_title', 10, 1 );

Notes#

Fired from two AJAX handlers with the same signature.

Source#

Applied in:

  • includes/class-rpress-ajax.php (line 792), in RP_AJAX::show_products()
  • includes/class-rpress-ajax.php (line 907), in RP_AJAX::edit_cart_fooditem()
Was this page helpful?