[wp-trac] [WordPress Trac] #62014: Editor: Add a 'format' parameter to query to enable filtering post formats in the Query Loop block

WordPress Trac noreply at wordpress.org
Mon Sep 9 11:18:13 UTC 2024


#62014: Editor: Add a 'format' parameter to query to enable filtering post formats
in the Query Loop block
-------------------------+--------------------
 Reporter:  poena        |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  6.7
Component:  General      |    Version:
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+--------------------
 I am opening this ticket tentatively to add the PHP changes from this
 Gutenberg PR:
 [https://github.com/WordPress/gutenberg/pull/64167 Query loop / Post
 template: Enable post format filter]

 At the time of opening this issue, this linked PR has not yet been
 approved, and this ticket should not be committed.
 I expect that there will be some additional changes to the PR.

 I could use help with adding a better summary (ticket title) and clearer
 description, but I will try my best.


 The Gutenberg PR linked above adds a new filter to the Query Loop block,
 that the user can use to display posts (or other post types) that have
 post formats assigned.

 The PR adds a new parameter called 'format' to the class
 {{{WP_REST_Posts_Controller}}}. Changes are made to these class methods:
 get_item and get_collection_params.

 'Format' is also added to the function
 {{{build_query_vars_from_query_block}}}, to display the correct posts on
 the front.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62014>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list