-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: limit excerpt lengths even for custom excerpts #874
Conversation
Trims excerpts even if it's a custom excerpt for a uniform look. Fixes Automattic/wp-calypso#51415
@obenland I'm not sure how to do this. After I run |
Heh, I was just thinking I should expand on the testing instructions :) I have my newspack-blocks repo sym-linked into |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The functionality is working well:
From a code standpoint, as someone not familiar with the code, I might wonder why both filter_excerpt
and filter_excerpt_length
exist, since they both seem to do the same thing. However the @deprecated
tag might provide enough of an explanation.
Noted a small spelling error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as expected, left one question.
🎉 This PR is included in version 1.39.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 1.39.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Trims excerpts even if it's a custom excerpt for a uniform look.
All Submissions:
Changes proposed in this Pull Request:
Deprecated excerpt_length and excerpt_more methods in favor of a comprehensive excerpt callback.
Core only allows to control the length of generated excerpts, assuming that authors want to keep their custom excerpts as they're written. This PR will apply the excerpt length limit to both types of excerpts for a more uniform look.
Closes Automattic/wp-calypso#51415
How to test the changes in this Pull Request:
Other information: