excerpt_more
Filter HookDescription
Filters the string in the "more" link displayed after a trimmed excerpt.Hook Information
File Location |
wp-includes/formatting.php
View on GitHub
|
Hook Type | Filter |
Line Number | 4020 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$more_string
|
The string shown within the more link. |
Usage Examples
Basic Usage
<?php
// Hook into excerpt_more
add_filter('excerpt_more', 'my_custom_filter', 10, 1);
function my_custom_filter($more_string) {
// Your custom filtering logic here
return $more_string;
}
Source Code Context
wp-includes/formatting.php:4020
- How this hook is used in WordPress core
<?php
4015 *
4016 * @since 2.9.0
4017 *
4018 * @param string $more_string The string shown within the more link.
4019 */
4020 $excerpt_more = apply_filters( 'excerpt_more', ' ' . '[…]' );
4021 $text = wp_trim_words( $text, $excerpt_length, $excerpt_more );
4022
4023 }
4024
4025 /**
PHP Documentation
<?php
/**
* Filters the string in the "more" link displayed after a trimmed excerpt.
*
* @since 2.9.0
*
* @param string $more_string The string shown within the more link.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/formatting.php
Related Hooks
Related hooks will be displayed here in future updates.