excerpt_more хук-фильтрWP 2.9.0

Filters the string in the "more" link displayed after a trimmed excerpt.

Использование

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(строка)
The string shown within the more link.

Список изменений

С версии 2.9.0 Введена.

Где вызывается хук

wp_trim_excerpt()
excerpt_more
wp-includes/formatting.php 4028
$excerpt_more = apply_filters( 'excerpt_more', ' ' . '[…]' );

Где используется хук в WordPress

wp-includes/blocks/post-excerpt.php 46
add_filter( 'excerpt_more', $filter_excerpt_more );
wp-includes/blocks/post-excerpt.php 63
remove_filter( 'excerpt_more', $filter_excerpt_more );
wp-includes/default-filters.php 699
add_filter( 'excerpt_more', 'wp_embed_excerpt_more', 20 );