Make WordPress Core

Changeset 13775


Ignore:
Timestamp:
03/20/2010 02:35:17 AM (15 years ago)
Author:
dd32
Message:

Add additional columns to the Posts Comments view. Props arena. Fixes #11231

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/meta-boxes.php

    r13538 r13775  
    407407}
    408408
     409/**
     410 * Displa comments for post table header
     411 *
     412 * @since 3.0
     413 *
     414 * @param $result table header rows
     415 * @return
     416 */
     417function post_comment_meta_box_thead($result) {
     418    unset($result['cb'], $result['response']);
     419    return $result;
     420}
    409421
    410422/**
     
    426438
    427439    wp_nonce_field( 'get-comments', 'add_comment_nonce', false );
     440    add_filter('manage_edit-comments_columns', 'post_comment_meta_box_thead', 8, 1);
    428441?>
    429442
    430443<table class="widefat comments-box fixed" cellspacing="0" style="display:none;">
    431444<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>
     445    <?php print_column_headers('edit-comments'); ?>
    435446</tr></thead>
    436447<tbody id="the-comment-list" class="list:comment"></tbody>
     
    443454<?php
    444455    }
     456    remove_filter('manage_edit-comments_columns', 'post_comment_meta_box_thead');
    445457    wp_comment_trashnotice();
    446458}
Note: See TracChangeset for help on using the changeset viewer.