From 017d679aa4d840855aa0d37bdacd7d538576e2b2 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sun, 24 Apr 2005 04:19:19 +0000 Subject: [PATCH] Correctly set comment and ping status when publishing from advanced edit page. http://mosquito.wordpress.org/view.php?id=877 Props: MC_incubus git-svn-id: https://develop.svn.wordpress.org/trunk@2574 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/post.php | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/wp-admin/post.php b/wp-admin/post.php index 20fbd8e39c..a1009bc38b 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -65,12 +65,23 @@ case 'post': // Double-check if ( 'publish' == $post_status && (!user_can_create_post($user_ID)) ) $post_status = 'draft'; + $comment_status = $_POST['comment_status']; - if ( empty($comment_status) && !isset($_POST['advanced_view']) ) - $comment_status = get_option('default_comment_status'); + if ( empty($comment_status) ) { + if ( !isset($_POST['advanced_view']) ) + $comment_status = get_option('default_comment_status'); + else + $comment_status = 'closed'; + } + $ping_status = $_POST['ping_status']; - if ( empty($ping_status) && !isset($_POST['advanced_view']) ) - $ping_status = get_option('default_ping_status'); + if ( empty($ping_status) ) { + if ( !isset($_POST['advanced_view']) ) + $ping_status = get_option('default_ping_status'); + else + $ping_status = 'closed'; + } + $post_password = $_POST['post_password']; $trackback = $_POST['trackback_url'];