[wp-trac] [WordPress Trac] #18950: get_post_types() does not return post-types registered with verbose alternatives of the $public argument

WordPress Trac wp-trac at lists.automattic.com
Wed Jul 18 04:11:02 UTC 2012


#18950: get_post_types() does not return post-types registered with verbose
alternatives of the $public argument
-------------------------------+------------------------------
 Reporter:  fireproofsocks     |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Post Types         |     Version:  3.2.1
 Severity:  major              |  Resolution:
 Keywords:  close 2nd-opinion  |
-------------------------------+------------------------------

Comment (by jeremyfelt):

 I did some digging a bit ago in the search for what the ever vague
 'public' meant. It is definitely a thing of it's own and it happens to
 flag a few other things in the process if they are not explicitly set.

 A full writeup on the digging is here, including where exactly in core
 'public', 'publicly_queryable', 'show_ui' and the rest are used:
 http://jeremyfelt.com/wordpress/2012/05/07/exploring-intention-when-
 registering-custom-post-types-in-wordpress/

 In a nutshell - 'public' is the correct attribute to use when querying for
 post types that are intended to be public. 'publicly_queryable' is used
 very specifically and there is some (IMO rightful) interest in eliminating
 it entirely during the 3.5 cycle.

 For reference, the ticket that got me caught up in the definition was
 [[ticket:19693]], though there are plenty out there. One of the things
 that resulted from that was the patch for `register_post_type()`
 documentation in 3.4, [[changeset:20734]], which provides much more detail
 for each of the arguments.

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


More information about the wp-trac mailing list