Opened 3 years ago
Last modified 22 months ago
#54850 new enhancement
New filter for build_query_vars_from_query_block()
Reported by: | grapplerulrich | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 5.8 |
Component: | Editor | Keywords: | has-patch |
Focuses: | Cc: |
Description
As raised in Gutenberg #36504 a filter to modify and extend the query for the query block would be helpful.
This would allow developers to add new attributes to the query loop block and then pass them to the query.
Change History (4)
This ticket was mentioned in PR #2185 on WordPress/wordpress-develop by grappler.
3 years ago
#1
- Keywords has-patch added
This ticket was mentioned in Slack in #core-editor by markhowellsmead. View the logs.
2 years ago
#3
@
2 years ago
This would also be helpful for me as I was just looking to extend the functionality of the Query Loop block and found it completely lacking in this particular area for me and other developers to customize the query arguments that the function builds up using the WP_Block object context information.
@ntsekouras commented on PR #2185:
22 months ago
#4
👋 - This filter has landed in core in 6.1
, coming from this Gutenberg PR: https://github.com/WordPress/gutenberg/pull/43590 and uses a different name(query_loop_block_query_vars
).
To modify the WP_Query args array from the
Query
block propertiesTrac ticket: https://core.trac.wordpress.org/ticket/54850