comment_excerpt_length WordPress Filter Hook

The comment_excerpt_length hook allows you to control the length of the excerpt for comments. This hook is useful if you want to ensure that comments are not too long or too short. You can use this hook to set the length of the excerpt to be whatever you want.

apply_filters( 'comment_excerpt_length', int $comment_excerpt_length ) #

Filters the maximum number of words used in the comment excerpt.


Parameters

$comment_excerpt_length

(int)The amount of words you want to display in the comment excerpt.


Top ↑

Source

File: wp-includes/comment-template.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.4.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
Show More