[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:42:21 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 duck_):

 Replying to [comment:5 wpdavis]:
 > Revisions are filtered out by post_status (inherit), not post_type,
 which remains the post type of the parent.

 Revisions are a separate post type.

 I am also not in favour of just returning published items by default. Such
 a change could possibly break those using the function who expect back
 posts with a status other than publish.

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


More information about the wp-trac mailing list