[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
Thu Sep 19 06:42:50 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):

 Would this be correct?
 The {{{AND}}} is not directly inside {{{'tax_query' => array(}}}, it is
 still nested:


 {{{
 [19-Sep-2024 06:39:44 UTC] Array
 (
     [post_type] => post
     [order] => DESC
     [orderby] => date
     [post__not_in] => Array
         (
         )

     [offset] => 0
     [posts_per_page] => 10
     [tax_query] => Array
         (
             [0] => Array
                 (
                     [taxonomy] => category
                     [terms] => Array
                         (
                             [0] => 4
                         )

                     [include_children] =>
                 )

             [1] => Array
                 (
                     [relation] => AND
                     [0] => 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
                                 )

                         )

                 )

         )

 )
 }}}

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


More information about the wp-trac mailing list