-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Footnotes: Trim footnote anchors from excerpts backport from Gutenberg #4845
Footnotes: Trim footnote anchors from excerpts backport from Gutenberg #4845
Conversation
…ntent. Adds tests
cc @mcsf Not sure if this is what you had in mind. Feel free to trash this one if so 😄 Also not sure if where I've put things is correct, e.g., different file? Different place in the excerpt formatting chain 🤷🏻 I probably need more tests too. Testing this PR surface a couple of bugs, e.g., WordPress/gutenberg#52628 |
Prefer PHP 8's str_contains
I've responded in Trac already, but yeah, this is great! :) |
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.
Thanks for the updates @ramonjd! LGTM 👍
Backports changes from WordPress/gutenberg#52518
Adding a function to
wp_trim_excerpt
that removes footnotes from content.Adds tests
Trac ticket: https://core.trac.wordpress.org/ticket/58805
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.