[wp-trac] [WordPress Trac] #21586: Telling register_post_type to not support anything

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 15 02:59:25 UTC 2012


#21586: Telling register_post_type to not support anything
-------------------------+-----------------------------
 Reporter:  sc0ttkclark  |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Post Types   |    Version:
 Severity:  normal       |   Keywords:
-------------------------+-----------------------------
 As the use of WP becomes more complex, post types are getting used in more
 interesting ways. This is evident by a use-case for passing an empty array
 to the 'supports' argument. Essentially, the Post Type becomes an object
 relatable to taxonomies and custom fields.

 If an empty array() is sent (or any empty value), WordPress currently sets
 the defaults to 'title' and 'editor':

 http://core.trac.wordpress.org/browser/tags/3.4.1/wp-
 includes/post.php#L1020

 I believe an alternate value should be able to passed such as false, where
 no defaults will get set. Currently, my work around is to pass an array,
 but place a faux value within it like '_placeholder'. This keeps the array
 from being empty and defaults set.

 I'll have the patch ready by morning but feel free to provide any input
 positive/negative on this.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21586>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list