When in advanced view it means the boxes are unchecked

git-svn-id: http://svn.automattic.com/wordpress/trunk@2290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2005-02-12 09:25:54 +00:00
parent 5d2fe3fa18
commit c8c2d1ef89
3 changed files with 9 additions and 4 deletions

View File

@ -70,7 +70,9 @@ window.onload = focusit;
<fieldset id="commentstatusdiv">
<legend><a href="http://wordpress.org/docs/reference/post/#comments" title="<?php _e('Help on comment status') ?>"><?php _e('Discussion') ?></a></legend>
<div><label for="comment_status" class="selectit">
<div>
<input name="advanced_view" type="hidden" value="1" />
<label for="comment_status" class="selectit">
<input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($comment_status, 'open'); ?> />
<?php _e('Allow Comments') ?></label>
<label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($ping_status, 'open'); ?> /> <?php _e('Allow Pings') ?></label>

View File

@ -38,7 +38,9 @@ window.onload = focusit;
</fieldset>
<fieldset id="commentstatusdiv">
<legend><?php _e('Discussion') ?></legend>
<div><label for="comment_status" class="selectit">
<div>
<input name="advanced_view" type="hidden" value="1" />
<label for="comment_status" class="selectit">
<input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($comment_status, 'open'); ?> />
<?php _e('Allow Comments') ?></label>
<label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($ping_status, 'open'); ?> /> <?php _e('Allow Pings') ?></label>

View File

@ -37,6 +37,7 @@ case 'post':
$post_name = $_POST['post_name'];
$post_parent = 0;
$menu_order = 0;
if ( isset($_POST['parent_id']) )
$post_parent = $_POST['parent_id'];
@ -60,10 +61,10 @@ case 'post':
if ( 'publish' == $post_status && (!user_can_create_post($user_ID)) && 2 != get_option('new_users_can_blog') )
$post_status = 'draft';
$comment_status = $_POST['comment_status'];
if ( empty($comment_status) )
if ( empty($comment_status) && !isset($_POST['advanced_view']) )
$comment_status = get_option('default_comment_status');
$ping_status = $_POST['ping_status'];
if ( empty($ping_status) )
if ( empty($ping_status) && !isset($_POST['advanced_view']) )
$ping_status = get_option('default_ping_status');
$post_password = $_POST['post_password'];