[wp-trac] [WordPress Trac] #20350: get_page_by_title() query can return unpublished page or page revision

WordPress Trac wp-trac at lists.automattic.com
Tue Apr 3 16:19:16 UTC 2012


#20350: get_page_by_title() query can return unpublished page or page revision
--------------------------+------------------------------
 Reporter:  wpdavis       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------------------

Comment (by wpdavis):

 Revisions are filtered out by post_status (inherit), not post_type, which
 remains the post type of the parent.

 There could be another var for post_status that could be a string or an
 array that would default to publish, if that would make you more
 comfortable.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20350#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list