Filter
rpress_modal_title
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#
| Parameter | Type | Description |
|---|---|---|
$food_title | string | The 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), inRP_AJAX::show_products()includes/class-rpress-ajax.php(line 907), inRP_AJAX::edit_cart_fooditem()
Was this page helpful?
