Allow supports => false to be passed to register_post_type() to disable the default title and editor.

An empty array may also disable all default features in the future.
Do not rely on this behavior: always specify title and editor if you want them.

props sc0ttkclark.
fixes #21586.



git-svn-id: http://core.svn.wordpress.org/trunk@21831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-09-13 17:02:39 +00:00
parent 58e1e69c4b
commit 5bc021dad7

View File

@ -1153,7 +1153,7 @@ function register_post_type( $post_type, $args = array() ) {
if ( ! empty($args->supports) ) {
add_post_type_support($post_type, $args->supports);
unset($args->supports);
} else {
} elseif ( false !== $args->supports ) {
// Add default features
add_post_type_support($post_type, array('title', 'editor'));
}