[wp-trac] [WordPress Trac] #21943: register_post_type() expect array but should object as well

WordPress Trac wp-trac at lists.automattic.com
Thu Sep 20 18:12:15 UTC 2012


#21943: register_post_type() expect array but should object as well
-------------------------+------------------------------
 Reporter:  thomask      |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Post Types   |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+------------------------------
Changes (by nacin):

 * type:  defect (bug) => enhancement


Comment:

 I don't think this is a bug.

 What $wp_post_types stores is not necessarily the same that is received by
 register_post_type(). I don't think they are necessarily interchangeable,
 either. IF they are interchangeable now, I'm not sure they should need to
 be in the future.

 For example, 'capabilities' (input array) versus 'cap' (output object).
 capability_type can take an array but reduces it to its first value once
 it is done with it.

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


More information about the wp-trac mailing list