excerpt_more
Filters the string in the "more" link displayed after a trimmed excerpt.
Usage
add_filter( 'excerpt_more', 'wp_kama_excerpt_more_filter' );
/**
* Function for `excerpt_more` filter-hook.
*
* @param string $more_string The string shown within the more link.
*
* @return string
*/
function wp_kama_excerpt_more_filter( $more_string ){
// filter...
return $more_string;
}
- $more_string(string)
- The string shown within the more link.
Changelog
| Since 2.9.0 | Introduced. |
Where the hook is called
wp-includes/formatting.php 4019
$excerpt_more = apply_filters( 'excerpt_more', ' ' . '[…]' );
Where the hook is used in WordPress
wp-includes/blocks/post-excerpt.php 39
add_filter( 'excerpt_more', $filter_excerpt_more );
wp-includes/blocks/post-excerpt.php 79
remove_filter( 'excerpt_more', $filter_excerpt_more );
wp-includes/default-filters.php 736
add_filter( 'excerpt_more', 'wp_embed_excerpt_more', 20 );