-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[Block Library - Query Loop]: Add multiple authors support #38024
Conversation
Size Change: +120 B (0%) Total Size: 1.13 MB
ℹ️ View Unchanged
|
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 PR is working as described. Good job!
Thanks for the reviews! I'll not merge yet, as an important change is included at the building step of Gutenberg and wasn't there at the time of the reviews. If the above change is okay, the rest already tested functionality had no other changes, so we'll be good to merge. |
e888012
to
f8843e1
Compare
I'm merging this one, but noting that an alternative approach about the change in the building step would be:
This would be also needed if we ever want to make block supports code also automatically backported. Thanks @youknowriad for the feedback/discussion about all these! |
Resolves: #26668
This PR adds support for filtering a
Query Loop
with multiple authors instead of just one, which is the current behavior.Follow up of: #37949
In addition
QueryControls
component usage is now removed completely.Testing instructions
webpack
config.Query Loop
whether we had set anauthor
filter to the block or not.Notes
This PR includes one more change that affects the building step of the plugin.
We need to automatically rename some functions when they are called inside block files, but have been declared elsewhere. This way we can call Gutenberg override functions, but the block will still call the core function when updates are back ported. Specifically we do it now for
build_query_vars_from_query_block
, but this could be used with other similar functions with the same use case.