From 879bd884039c0364a4148dde48aaf405aefe1408 Mon Sep 17 00:00:00 2001 From: ryan Date: Sun, 19 Feb 2006 10:57:27 +0000 Subject: [PATCH] Honor comment_status and ping_status when writing a new post. Props Mark Jaquith. fixes #2445 git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@3554 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-functions.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index 49004dd179..7de35d21b1 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -43,6 +43,12 @@ function write_post() { if ('static' == $_POST['post_status'] && !current_user_can('edit_pages')) die(__('This user cannot edit pages.')); + if (!isset ($_POST['comment_status'])) + $_POST['comment_status'] = 'closed'; + + if (!isset ($_POST['ping_status'])) + $_POST['ping_status'] = 'closed'; + if (!empty ($_POST['edit_date'])) { $aa = $_POST['aa']; $mm = $_POST['mm'];