WordPress.org

Make WordPress Core

Ticket #11231: #11231.patch

File #11231.patch, 1.4 KB (added by arena, 4 years ago)

patch refresh

  • wp-admin/includes/meta-boxes.php

     
    406406<?php 
    407407} 
    408408 
     409/**  
     410* Display comments for post table header  
     411*  
     412* @since 3.0 
     413*  
     414* @param object $post  
     415*/  
     416function post_comment_meta_box_thead($result) {  
     417        unset($result['cb'], $result['response']); 
     418        return $result;  
     419}  
    409420 
    410421/** 
    411422 * Display comments for post. 
     
    425436        } 
    426437 
    427438        wp_nonce_field( 'get-comments', 'add_comment_nonce', false ); 
     439        add_filter('manage_edit-comments_columns', 'post_comment_meta_box_thead', 8, 1); 
    428440?> 
    429441 
    430442<table class="widefat comments-box fixed" cellspacing="0" style="display:none;"> 
    431443<thead><tr> 
    432     <th scope="col" class="column-author"><?php _e('Author') ?></th> 
    433     <th scope="col" class="column-comment"> 
    434 <?php /* translators: field name in comment form */ echo _x('Comment', 'noun'); ?></th> 
     444        <?php print_column_headers('edit-comments'); ?>  
    435445</tr></thead> 
    436446<tbody id="the-comment-list" class="list:comment"></tbody> 
    437447</table> 
     
    442452                <script type="text/javascript">jQuery(document).ready(function(){commentsBox.get(<?php echo $total; ?>, 10);});</script> 
    443453<?php 
    444454        } 
     455        remove_filter('manage_edit-comments_columns', 'post_comment_meta_box_thead');  
    445456        wp_comment_trashnotice(); 
    446457} 
    447458