From 5bc021dad74390a68dcc7678beb947850f89adac Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 13 Sep 2012 17:02:39 +0000 Subject: [PATCH] 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 --- wp-includes/post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 88df9fa7e9..cfdb22d360 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -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')); }