Filter
rpress_fooditems_excerpt
On this page
Filters the trimmed description of a menu item that has an excerpt.
Runs in the menu item title templates when the item has a manual excerpt. The value is the excerpt trimmed with wp_trim_words().
Parameters#
| Parameter | Type | Description |
|---|---|---|
$excerpt | string | The description trimmed to the excerpt length. |
$description | string | The full description before trimming. |
Return value#
string. The text to display.
Example#
function my_fooditems_excerpt( $excerpt, $description ) {
return ucfirst( $excerpt );
}
add_filter( 'rpress_fooditems_excerpt', 'my_fooditems_excerpt', 10, 2 );
Notes#
The output is passed through wp_kses() allowing only p tags.
Source#
Applied in:
templates/fooditem/content-title.php(line 20)templates/grid/content-title.php(line 21)templates/list/content-title.php(line 80)templates/packs/modern/list/single.php(line 78)
See also#
Was this page helpful?
