Repository navigation
Conversation
This was referenced Oct 12, 2026
This was referenced Oct 12, 2026
Member
Author
|
I changed the summary to use What we get:
What we have to accept:
I think this is fine for a summary, and by following core we behave the way other plugins expect excerpts to work. @jeherve what do you think? |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes:
the_content. It is now built withget_the_excerpt(), with the global post set, so the content filters run and plugins see the excerpt path they already know.doing_filter( 'get_the_excerpt' ), so the summary stops at the paywall and the "Subscribe to continue reading" prompt is gone.excerpt_remove_blocks()), so a search form no longer ends up as "SearchSearch".[ap_excerpt length]work like before, also on sites that count characters instead of words (Chinese, Japanese). No theme read-more link is added.get_the_excerpt()runsthe_content, where the mention filter turns@user@hostinto a link with only@useras text, and the excerpt strips the link. So mentions are not linked while an excerpt is built: the excerpt keeps@user@host, and the summary links it like before. Theme excerpts on the website show the full handle now too.get_extended(),sanitize_post_field()and the whitespace regexes are gone.Other information:
This follows #3876. Together they make sure the summary shows what a logged-out visitor sees.
What changes for the summary:
<!--more-->: the summary is the text above the tag, without[…]. A post that starts with the tag has no summary. When the JSON is built on the post's own page (a remote server fetching the permalink), core ignores the tag, so the summary is the start of the whole post. TheCreatesent on publish has the teaser.<!--nextpage-->only use the first page, or the page of the request.get_the_excerptcan add to the summary. Twenty Ten and Twenty Eleven add "Continue reading" to manual excerpts.Don’tinstead ofDon't).I think this is fine for a summary, and by following core we behave the way other plugins expect excerpts to work.
Testing instructions:
the_contentfilter that removes part of a post.Accept: application/activity+json: thesummarydoes not contain the removed part.summarystops at the paywall and has no subscribe prompt.Changelog entry
Changelog Entry Details
Significance
Type
Message
Post summaries now respect plugins that change or hide parts of the post content.