WordPress.org

Make WordPress Core

Changeset 19372


Ignore:
Timestamp:
11/21/11 13:45:10 (2 years ago)
Author:
westi
Message:

Respect the default comment/ping status for new posts even when someone has hidden the meta box which lets you alter them on a per-post basis.
Fixes #13473 props solarissmoke.

File:
1 edited

Legend:

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

    r19054 r19372  
    9797 
    9898    if (!isset( $post_data['comment_status'] )) 
    99         $post_data['comment_status'] = 'closed'; 
     99        $post_data['comment_status'] =  post_type_supports( $post_data['post_type'], 'comments' ) ? get_option( 'default_comment_status' ) : 'closed'; 
    100100 
    101101    if (!isset( $post_data['ping_status'] )) 
    102         $post_data['ping_status'] = 'closed'; 
     102        $post_data['ping_status'] =  post_type_supports( $post_data['post_type'], 'trackbacks' ) ? get_option( 'default_ping_status' ) : 'closed'; 
    103103 
    104104    foreach ( array('aa', 'mm', 'jj', 'hh', 'mn') as $timeunit ) { 
Note: See TracChangeset for help on using the changeset viewer.