wpmem_auto_excerpt

Description

Filters the auto generated post excerpt, if auto excerpts are being used.

Comes at the end of the process, after the $content variable has been truncated.  The auto excerpt will be the number of words specified in the plugin options plus the “more” link.

Parameters

$content
(string) (required) The autogenerated excerpt.

$post_id
(int) (optional) The post ID.

$post_type
(strong) (optional) The WordPress post type of the current post.

Return

$content
(string) (required) The excerpt.

Example

[snippet slug=use-wpmem_auto_excerpt-to-get-the-wp-excerpt lang=php]

Changelog

  • Introduced 2.8.1
  • 3.0.9 Added post ID and post type parameters.
  • 3.2.5 Post ID and post type may be false if there is no post object.

Source

wpmem_auto_excerpt is located in /includes/class-wp-members.php