Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: comment_excerpt_length

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
601      $comment_excerpt_length = intval( _x( '20', 'comment_excerpt_length' ) );
602
603      /**
604       * Filters the maximum number of words used in the comment excerpt.
605       *
606       * @since 4.4.0
607       *
608       * @param int $comment_excerpt_length The amount of words you want to display in the comment excerpt.
609       */
610      $comment_excerpt_length = apply_filters( 'comment_excerpt_length', $comment_excerpt_length );
611
612      $excerpt = wp_trim_words( $comment_text, $comment_excerpt_length, '…' );
613
614      /**
615       * Filters the retrieved comment excerpt.
616       *
617       * @since 1.5.0
618       * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
619       *