[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:12:42 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 nacin):

 get_page_by_title() can't return a revision; it does limit things by post
 type.

 Not sure if it makes sense to completely limit this to publish only. I
 imagine you could then just check the post status of whatever you
 returned. Obviously, that would not help in the case where two posts could
 return the same result, but it's a lame function for that already (two
 posts both published would still only give you one).

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


More information about the wp-trac mailing list