Remove default_comment_status_pages setting. Reverts [14451], [14448] for 3.0. see #12991.

git-svn-id: http://svn.automattic.com/wordpress/trunk@14650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-05-15 04:56:56 +00:00
parent 7c8a77efa3
commit 5463205114
5 changed files with 3 additions and 18 deletions

View File

@ -385,11 +385,7 @@ function get_default_post_to_edit( $post_type = 'post', $create_in_db = false )
$post->post_status = 'draft';
$post->to_ping = '';
$post->pinged = '';
if ( 'page' == $post_type ) {
$post->comment_status = get_option( 'default_comment_status_page' );
} else {
$post->comment_status = get_option( 'default_comment_status' );
}
$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' );

View File

@ -215,7 +215,6 @@ function populate_options() {
'mailserver_port' => 110,
'default_category' => 1,
'default_comment_status' => 'open',
'default_comment_status_page' => 'open',
'default_ping_status' => 'open',
'default_pingback_flag' => 1,
'default_post_edit_rows' => 10,

View File

@ -42,12 +42,6 @@ include('./admin-header.php');
<?php _e('Allow people to post comments on new articles') ?></label>
<br />
<small><em><?php echo '(' . __('These settings may be overridden for individual articles.') . ')'; ?></em></small>
<br />
<label for="default_comment_status_page">
<input name="default_comment_status_page" type="checkbox" id="default_comment_status_page" value="open" <?php checked('open', get_option('default_comment_status_page')); ?> />
<?php _e('Allow people to post comments on new pages') ?></label>
<br />
<small><em><?php echo '(' . __('These settings may be overridden for individual pages.') . ')'; ?></em></small>
</fieldset></td>
</tr>
<tr valign="top">

View File

@ -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_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' ),
'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' ),
'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' ),

View File

@ -2252,11 +2252,7 @@ function wp_insert_post($postarr = array(), $wp_error = false) {
if ( $update )
$comment_status = 'closed';
else
if ( 'page' == $post_type ) {
$comment_status = get_option( 'default_comment_status_page' );
} else {
$comment_status = get_option( 'default_comment_status' );
}
$comment_status = get_option('default_comment_status');
}
if ( empty($ping_status) )
$ping_status = get_option('default_ping_status');