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