WordPress.org

Make WordPress Core

Ticket #36462: patch.2.diff

File patch.2.diff, 2.1 KB (added by SeBsZ, 4 years ago)
  • wp-admin/includes/meta-boxes.php

     
    657657?>
    658658<input name="advanced_view" type="hidden" value="1" />
    659659<p class="meta-options">
    660        <label for="comment_status" class="selectit"><input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($post->comment_status, 'open'); ?> /> <?php _e( 'Allow comments.' ) ?></label><br />
    661        <label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($post->ping_status, 'open'); ?> /> <?php
     660       <label for="comment_status" class="selectit"><input name="comment_status" type="hidden" value="closed"><input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($post->comment_status, 'open'); ?> /> <?php _e( 'Allow comments.' ) ?></label><br />
     661       <label for="ping_status" class="selectit"><input name="ping_status" type="hidden" value="closed"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($post->ping_status, 'open'); ?> /> <?php
    662662               printf(
    663663                       /* translators: %s: Codex URL */
    664664                       __( 'Allow <a href="%s">trackbacks and pingbacks</a> on this page.' ),
  • wp-admin/includes/post.php

     
    130130               unset( $post_data['post_password'] );
    131131       }
    132132
    133        if (!isset( $post_data['comment_status'] ))
    134                $post_data['comment_status'] = 'closed';
    135 
    136        if (!isset( $post_data['ping_status'] ))
    137                $post_data['ping_status'] = 'closed';
    138 
    139133       foreach ( array('aa', 'mm', 'jj', 'hh', 'mn') as $timeunit ) {
    140134               if ( !empty( $post_data['hidden_' . $timeunit] ) && $post_data['hidden_' . $timeunit] != $post_data[$timeunit] ) {
    141135                       $post_data['edit_date'] = '1';