diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 69facf61d..6d03db1b8 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -379,7 +379,11 @@ function get_default_post_to_edit( $post_type = 'post', $create_in_db = false ) $post->post_status = 'draft'; $post->to_ping = ''; $post->pinged = ''; - $post->comment_status = get_option( 'default_comment_status' ); + if ( 'page' == $post_type ) { + $post->comment_status = get_option( 'default_comment_status_page' ); + } else { + $post->comment_status = get_option( 'default_comment_status' ); + } $post->ping_status = get_option( 'default_ping_status' ); $post->post_pingback = get_option( 'default_pingback_flag' ); $post->post_category = get_option( 'default_category' ); diff --git a/wp-admin/options-discussion.php b/wp-admin/options-discussion.php index 8802f7631..d9457bbbb 100644 --- a/wp-admin/options-discussion.php +++ b/wp-admin/options-discussion.php @@ -42,6 +42,12 @@ include('./admin-header.php');
+
+ +
+ diff --git a/wp-admin/options.php b/wp-admin/options.php index 15f489d3e..0a4e8817e 100644 --- a/wp-admin/options.php +++ b/wp-admin/options.php @@ -56,7 +56,7 @@ if ( is_multisite() && !is_super_admin() && 'update' != $action ) $whitelist_options = array( 'general' => array( 'blogname', 'blogdescription', 'gmt_offset', 'date_format', 'time_format', 'start_of_week', 'timezone_string' ), - 'discussion' => array( 'default_pingback_flag', 'default_ping_status', 'default_comment_status', 'comments_notify', 'moderation_notify', 'comment_moderation', 'require_name_email', 'comment_whitelist', 'comment_max_links', 'moderation_keys', 'blacklist_keys', 'show_avatars', 'avatar_rating', 'avatar_default', 'close_comments_for_old_posts', 'close_comments_days_old', 'thread_comments', 'thread_comments_depth', 'page_comments', 'comments_per_page', 'default_comments_page', 'comment_order', 'comment_registration' ), + 'discussion' => array( 'default_pingback_flag', 'default_ping_status', 'default_comment_status_page', 'default_comment_status', 'comments_notify', 'moderation_notify', 'comment_moderation', 'require_name_email', 'comment_whitelist', 'comment_max_links', 'moderation_keys', 'blacklist_keys', 'show_avatars', 'avatar_rating', 'avatar_default', 'close_comments_for_old_posts', 'close_comments_days_old', 'thread_comments', 'thread_comments_depth', 'page_comments', 'comments_per_page', 'default_comments_page', 'comment_order', 'comment_registration' ), 'media' => array( 'thumbnail_size_w', 'thumbnail_size_h', 'thumbnail_crop', 'medium_size_w', 'medium_size_h', 'large_size_w', 'large_size_h', 'image_default_size', 'image_default_align', 'image_default_link_type', 'embed_autourls', 'embed_size_w', 'embed_size_h' ), 'privacy' => array( 'blog_public' ), 'reading' => array( 'posts_per_page', 'posts_per_rss', 'rss_use_excerpt', 'blog_charset', 'show_on_front', 'page_on_front', 'page_for_posts' ), diff --git a/wp-includes/post.php b/wp-includes/post.php index 8c54b01db..e6a73717a 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -2159,7 +2159,11 @@ function wp_insert_post($postarr = array(), $wp_error = false) { if ( $update ) $comment_status = 'closed'; else - $comment_status = get_option('default_comment_status'); + if ( 'page' == $post_type ) { + $comment_status = get_option( 'default_comment_status_page' ); + } else { + $comment_status = get_option( 'default_comment_status' ); + } } if ( empty($ping_status) ) $ping_status = get_option('default_ping_status');