Fix missing return value in force_filtered_html_on_import footnotes filter - #81293
Merged
Conversation
aaronjorbin
approved these changes
Aug 6, 2026
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
tyxla
approved these changes
Aug 6, 2026
aduth
force-pushed
the
fix/missing-return-value-footnotes-filter
branch
from
August 6, 2026 17:54
a109d7f to
b55c798
Compare
Member
Author
|
I just cherry-picked this PR to the release/23.7 branch to get it included in the next release: f54adf3 |
aduth
added a commit
that referenced
this pull request
Aug 6, 2026
…ilter (#81293) * Fix missing return value in force_filtered_html_on_import footnotes filter Co-authored-by: aduth <aduth@git.wordpress.org> Co-authored-by: aaronjorbin <jorbin@git.wordpress.org> Co-authored-by: tyxla <tyxla@git.wordpress.org>
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.
What?
This PR adds back a missing return value of the
force_filtered_html_on_importfilter in the_gutenberg_footnotes_force_filtered_html_on_import_filtercallback. Previously it did not return a value on one of its branches.Why?
A filter callback must always return the value it receives. In our function, when the core function
_wp_filter_post_meta_footnotes()exists, the code did return;. This returnsnullinstead of the original value.How?
The fix is very small. On the short-circuit branch we now return the input value instead of nothing:
Testing Instructions
Verify PHP tests pass.
Use of AI Tools
Changes applied manually.