Make WordPress Core

Opened 5 years ago

Last modified 4 years ago

#54850 new enhancement

New filter for build_query_vars_from_query_block()

Reported by: grapplerulrich Owned by:
Priority: normal Milestone: Awaiting Review
Component: Editor Version: 5.8
Severity: normal Keywords: has-patch
Cc: Focuses:

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.


5 years ago
#1

  • Keywords has-patch added

To modify the WP_Query args array from the Query block properties

Trac ticket: https://core.trac.wordpress.org/ticket/54850

This ticket was mentioned in ​Slack in #core-editor by markhowellsmead. ​View the logs.


4 years ago

#3 @sc0ttkclark
4 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:


4 years 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).

Note: See TracTickets for help on using tickets.