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
This commit is contained in:
Ryan Boren 2005-04-24 04:19:19 +00:00
parent c2ca4a6f4e
commit 017d679aa4
1 changed files with 15 additions and 4 deletions

View File

@ -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'];