wp_trim_excerpt filter-hookWP 2.8.0

Filters the trimmed excerpt string.

Usage

add_filter( 'wp_trim_excerpt', 'wp_kama_trim_excerpt_filter', 10, 2 );

/**
 * Function for `wp_trim_excerpt` filter-hook.
 * 
 * @param string $text        The trimmed text.
 * @param string $raw_excerpt The text prior to trimming.
 *
 * @return string
 */
function wp_kama_trim_excerpt_filter( $text, $raw_excerpt ){

	// filter...
	return $text;
}
$text(string)
The trimmed text.
$raw_excerpt(string)
The text prior to trimming.

Changelog

Since 2.8.0 Introduced.

Where the hook is called

wp_trim_excerpt()
wp_trim_excerpt
wp-includes/formatting.php 3911
return apply_filters( 'wp_trim_excerpt', $text, $raw_excerpt );

Where the hook is used in WordPress

Usage not found.