[wp-trac] [WordPress Trac] #34012: post_exists() results in a bad query

WordPress Trac noreply at wordpress.org
Mon Mar 1 03:54:39 UTC 2021


#34012: post_exists() results in a bad query
-------------------------------------------------+-------------------------
 Reporter:  apokalyptik                          |       Owner:  whyisjake
     Type:  enhancement                          |      Status:  accepted
 Priority:  normal                               |   Milestone:  5.8
Component:  Posts, Post Types                    |     Version:  4.4
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing has-unit-    |     Focuses:
  tests                                          |  performance
-------------------------------------------------+-------------------------

Comment (by peterwilsoncc):

 [attachment:"44314.diff"] is essentially @brettshumaker's patch with the
 following changes:

 * Added a `@since` tag to the docblock for the new argument
 * A few coding standards nitpicks fixed in the unit tests
 * Added a couple of tests for post type and post status combos: both happy
 and unhappy paths

 Adding the status parameter to improve the query makes sense to me

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


More information about the wp-trac mailing list