I can confirm that offering this filter makes it possible to display the excerpt you want using the more button (string) within the text.
For those of you who want to use this in an add filter (based on the example above):
function good_review_excerpt( $review ) {
global $grfwp_controller;
// Excerpt selected for display?
if ($grfwp_controller->args['excerpt'] == 1) {
// Own excerpt text not used?
if( !has_excerpt($review)) {
// Excerpt needs to be created and we want something larger than the excerpt maximum length (55)
$this_excerpt = get_the_content('', 0, $review);
// More string not there? If it is there excerpt is now ready!
if( strpos( $review->post_content, '<!--more-->' ) == 0 ) {
$this_excerpt = substr($this_excerpt, 0, 500);
$this_excerpt = substr($this_excerpt, 0, strrpos($this_excerpt, ' ')) . ' [...]';
}
$review->post_excerpt = $this_excerpt;
}
}
return $review;
}
-
This reply was modified 4 years ago by Harm10.