[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
Wed Sep 25 05:37:56 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:  Editor                               |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-testing-info needs-    |     Focuses:
  testing needs-unit-tests                       |
-------------------------------------------------+-------------------------

Comment (by poena):

 I wanted to confirm that with the changes that @peterwilsoncc proposed,
 the log of the query is as follows, with the {{{AND}}} nested at the
 correct level:

 {{{
 [25-Sep-2024 05:22:23 UTC] Array
 (
     [post_type] => post
     [order] => DESC
     [orderby] => date
     [post__not_in] => Array
         (
         )

     [tax_query] => Array
         (
             [relation] => AND
             [0] => Array
                 (
                     [0] => Array
                         (
                             [taxonomy] => category
                             [terms] => Array
                                 (
                                     [0] => 4
                                 )

                             [include_children] =>
                         )

                 )

             [1] => Array
                 (
                     [relation] => OR
                     [0] => Array
                         (
                             [taxonomy] => post_format
                             [field] => slug
                             [operator] => NOT EXISTS
                         )

                     [1] => Array
                         (
                             [taxonomy] => post_format
                             [field] => slug
                             [terms] => Array
                                 (
                                     [0] => post-format-link
                                     [2] => post-format-gallery
                                 )

                             [operator] => IN
                         )

                 )

         )

     [offset] => 0
     [posts_per_page] => 10
     [author__in] => Array
         (
         )

 )
 }}}

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


More information about the wp-trac mailing list