Action
rpress_product_details_widget_before_title
On this page
Fires after the title and before the item name in the menu item details widget.
Runs in the menu item details widget output after the widget title and before the menu item title is printed.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$instance | array | The widget instance settings. |
$fooditem_id | int | ID of the menu item shown in the widget. |
Example#
function my_details_widget_before_title( $instance, $fooditem_id ) {
echo '<span class="my-badge">' . esc_html__( 'Popular', 'my-textdomain' ) . '</span>';
}
add_action( 'rpress_product_details_widget_before_title', 'my_details_widget_before_title', 10, 2 );
Source#
Fired from:
includes/widgets.php(line 246), inRPRESS_Product_Details_Widget::widget()
See also#
Was this page helpful?
