mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-04 18:01:42 +01:00
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:
parent
58e1e69c4b
commit
5bc021dad7
@ -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'));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user