WordPress.org

Make WordPress Core

Ticket #21586: 21520.patch

File 21520.patch, 1.3 KB (added by markoheijnen, 6 years ago)
  • wp-includes/post.php

     
    979979                'capability_type' => 'post', 'capabilities' => array(), 'map_meta_cap' => null,
    980980                '_builtin' => false, '_edit_link' => 'post.php?post=%d', 'hierarchical' => false,
    981981                'public' => false, 'rewrite' => true, 'has_archive' => false, 'query_var' => true,
    982                 'supports' => array(), 'register_meta_box_cb' => null,
     982                'supports' => array('title', 'editor'), 'register_meta_box_cb' => null,
    983983                'taxonomies' => array(), 'show_ui' => null, 'menu_position' => null, 'menu_icon' => null,
    984984                'can_export' => true,
    985985                'show_in_nav_menus' => null, 'show_in_menu' => null, 'show_in_admin_bar' => null,
     
    10311031        if ( is_array( $args->capability_type ) )
    10321032                $args->capability_type = $args->capability_type[0];
    10331033
    1034         if ( ! empty($args->supports) ) {
    1035                 add_post_type_support($post_type, $args->supports);
    1036                 unset($args->supports);
    1037         } else {
    1038                 // Add default features
    1039                 add_post_type_support($post_type, array('title', 'editor'));
    1040         }
     1034        add_post_type_support($post_type, $args->supports);
     1035        unset($args->supports);
    10411036
    10421037        if ( false !== $args->query_var && !empty($wp) ) {
    10431038                if ( true === $args->query_var )