Recent

crp_excerpt_pre_trimfilter

crp_excerpt_pre_trim

Filters excerpt generated by CRP before it is trimmed.

Type: filter
Since: 2.3.0
Source: includes/frontend/class-display.php line 465

Changelog

Version Description
3.0.0 Changed second parameter to WP_Post instance instead of ID.
2.9.0 Added $content parameter
2.3.0 Introduced.

Parameters

Type Name Description
string $output Formatted excerpt.
\WP_Post $post Source Post instance.
int $excerpt_length Length of the excerpt.
boolean $use_excerpt Use the excerpt?
string $content Content that is used to create the excerpt.

Usage

add_filter( 'crp_excerpt_pre_trim', function($output, $post, $excerpt_length, $use_excerpt, $content) {
    // ...
    return $output;
} );