wp_trim_excerpt WordPress Filter Hook

The wp_trim_excerpt hook is used to trim a post's excerpt to the desired length. It is useful for customizing the excerpt length on a per-post basis.

apply_filters( 'wp_trim_excerpt', string $text, string $raw_excerpt ) #

Filters the trimmed excerpt string.


Parameters

$text

(string)The trimmed text.

$raw_excerpt

(string)The text prior to trimming.


Top ↑

Source

File: wp-includes/formatting.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More