-
Notifications
You must be signed in to change notification settings - Fork 33
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: enforce display condition to return string in render_block
filter
#2192
Merged
Conversation
This file contains 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
Soare-Robert-Daniel
added
the
pr-checklist-skip
Allow this Pull Request to skip checklist.
label
Apr 22, 2024
Bundle Size Diff
|
Plugin build for 33b4b38 is ready 🛎️!
|
E2E TestsPlaywright Test Status: Performance ResultsserverResponse: 221.4, firstPaint: 565.3, domContentLoaded: 1578.35, loaded: 1578.85, firstContentfulPaint: 3673.8, firstBlock: 5542.3, type: 12.49, minType: 10.23, maxType: 16.44, typeContainer: 8.25, minTypeContainer: 6.91, maxTypeContainer: 9.43, focus: 42.62, minFocus: 36.91, maxFocus: 53.8, inserterOpen: 27.85, minInserterOpen: 24.37, maxInserterOpen: 32.55, inserterSearch: 6.4, minInserterSearch: 5.98, maxInserterSearch: 7.12, inserterHover: 3.41, minInserterHover: 2.83, maxInserterHover: 4.5, listViewOpen: 158.27, minListViewOpen: 138.7, maxListViewOpen: 204.34 |
pirate-bot
added
the
pr-checklist-complete
The Pull Request checklist is complete. (automatic label)
label
Apr 22, 2024
Soare-Robert-Daniel
requested review from
GrigoreMihai
and removed request for
preda-bogdan
April 22, 2024 13:32
GrigoreMihai
approved these changes
Apr 22, 2024
Merged
🎉 This PR is included in version 2.6.11 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
pirate-bot
added
the
released
Indicate that an issue has been resolved and released in a particular version of the product.
label
Apr 26, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
pr-checklist-complete
The Pull Request checklist is complete. (automatic label)
pr-checklist-skip
Allow this Pull Request to skip checklist.
released
Indicate that an issue has been resolved and released in a particular version of the product.
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.
Closes #2191
Summary
Because the function
render_blocks
for block conditions could not return anything, an error is raised because the filterrender_block
must return a string.I refactored the function so that it always returns a string. Also, change from
add_action
toadd_filter
sincerender_block
exists as a filter, and with the new phpdoc added to the function, phpstan does not allow us to use theadd_action
since we are always returning something.Note
By being aware of #2177, in this PR, the introduced test is critical to succeed.
Test instructions
Checklist before the final review