Plugin Author
Brecht
(@brechtvds)
Hi there,
You’re right. The filter only gets applied if there actually is any output at the moment. It would make sense to change that for a next update.
We do have the wprm_recipe_field
filter hook as well. That could be used to change what the $recipe->summary()
function returns:
function adjust_recipe_summary( $value, $field, $recipe ) {
if ( 'summary' === $field ) {
if ( ! $value ) {
$parent_post_id = $recipe->parent_post_id();if ( $parent_post_id ) {
...
}
}
}
return $value;
}
add_filter( 'wprm_recipe_field', 'adjust_recipe_summary', 10, 3 );