WordPress.org

Make WordPress Core

Ticket #9674: post.diff

File post.diff, 1.5 KB (added by waltervos, 6 years ago)

Replaces my previous post.diff. This diff makes default => public in register_post_status and register_post_type comply with the documentation by making it default to true.

  • post.php

     
    504504                $wp_post_statuses = array(); 
    505505 
    506506        // Args prefixed with an underscore are reserved for internal use. 
    507         $defaults = array('label' => false, 'label_count' => false, 'exclude_from_search' => true, '_builtin' => false, '_edit_link' => 'post.php?post=%d', 'capability_type' => 'post', 'hierarchical' => false, 'public' => false, '_show' => false); 
     507        $defaults = array('label' => false, 'label_count' => false, 'exclude_from_search' => true, '_builtin' => false, '_edit_link' => 'post.php?post=%d', 'capability_type' => 'post', 'hierarchical' => false, 'public' => true, '_show' => false); 
    508508        $args = wp_parse_args($args, $defaults); 
    509509        $args = (object) $args; 
    510510 
     
    707707                $wp_post_types = array(); 
    708708 
    709709        // Args prefixed with an underscore are reserved for internal use. 
    710         $defaults = array('label' => false, 'exclude_from_search' => true, '_builtin' => false, '_edit_link' => 'post.php?post=%d', 'capability_type' => 'post', 'hierarchical' => false, 'public' => false, '_show' => false, 'supports' => array()); 
     710        $defaults = array('label' => false, 'exclude_from_search' => true, '_builtin' => false, '_edit_link' => 'post.php?post=%d', 'capability_type' => 'post', 'hierarchical' => false, 'public' => true, '_show' => false, 'supports' => array()); 
    711711        $args = wp_parse_args($args, $defaults); 
    712712        $args = (object) $args; 
    713713