WordPress.org

Make WordPress Core

Changeset 21831


Ignore:
Timestamp:
09/13/2012 05:02:39 PM (8 years ago)
Author:
nacin
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r21822 r21831  
    11541154        add_post_type_support($post_type, $args->supports);
    11551155        unset($args->supports);
    1156     } else {
     1156    } elseif ( false !== $args->supports ) {
    11571157        // Add default features
    11581158        add_post_type_support($post_type, array('title', 'editor'));
Note: See TracChangeset for help on using the changeset viewer.