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. 


git-svn-id: http://svn.automattic.com/wordpress/trunk@19372 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2011-11-21 13:45:10 +00:00
parent cd1621c23b
commit a29b2945ae
1 changed files with 2 additions and 2 deletions

View File

@ -96,10 +96,10 @@ function _wp_translate_postdata( $update = false, $post_data = null ) {
$post_data['post_status'] = $previous_status;
if (!isset( $post_data['comment_status'] ))
$post_data['comment_status'] = 'closed';
$post_data['comment_status'] = post_type_supports( $post_data['post_type'], 'comments' ) ? get_option( 'default_comment_status' ) : 'closed';
if (!isset( $post_data['ping_status'] ))
$post_data['ping_status'] = 'closed';
$post_data['ping_status'] = post_type_supports( $post_data['post_type'], 'trackbacks' ) ? get_option( 'default_ping_status' ) : 'closed';
foreach ( array('aa', 'mm', 'jj', 'hh', 'mn') as $timeunit ) {
if ( !empty( $post_data['hidden_' . $timeunit] ) && $post_data['hidden_' . $timeunit] != $post_data[$timeunit] ) {