| 1 | <?php |
|---|
| 2 | /* |
|---|
| 3 | Plugin Name: Comment_#11231 |
|---|
| 4 | Description: Just a plugin to test ticket #11231 |
|---|
| 5 | */ |
|---|
| 6 | |
|---|
| 7 | class Comment_11231 |
|---|
| 8 | { |
|---|
| 9 | function __construct() |
|---|
| 10 | { |
|---|
| 11 | // for comments list |
|---|
| 12 | add_filter('manage_edit-comments_columns', array(__CLASS__, 'manage_edit_comments_columns'), 10, 1); |
|---|
| 13 | add_action('manage_comments_custom_column', array(__CLASS__, 'manage_comments_custom_column'), 10, 2); |
|---|
| 14 | } |
|---|
| 15 | // for comments list |
|---|
| 16 | public static function manage_edit_comments_columns($x) |
|---|
| 17 | { |
|---|
| 18 | $x['#11231']= '#11231'; |
|---|
| 19 | return $x; |
|---|
| 20 | } |
|---|
| 21 | |
|---|
| 22 | public static function manage_comments_custom_column($column_name, $comment_id) |
|---|
| 23 | { |
|---|
| 24 | if ('#11231' != $column_name) return; |
|---|
| 25 | echo '** #11231 **'; |
|---|
| 26 | } |
|---|
| 27 | } |
|---|
| 28 | $Comment_11231 = new Comment_11231(); |
|---|
| 29 | ?> |
|---|