| @@ 40-47 (lines=8) @@ | ||
| 37 | return $results; |
|
| 38 | } |
|
| 39 | ||
| 40 | function get_columns() { |
|
| 41 | $columns = array( |
|
| 42 | 'feedback_from' => __('From', 'jetpack'), |
|
| 43 | 'feedback_message' => __('Message', 'jetpack'), |
|
| 44 | 'feedback_date' => __('Date', 'jetpack'), |
|
| 45 | ); |
|
| 46 | return $columns; |
|
| 47 | } |
|
| 48 | ||
| 49 | function prepare_items( $search_term = '' ) { |
|
| 50 | $this->_column_headers = array( $this->get_columns(), array(), array() ); |
|
| @@ 275-284 (lines=10) @@ | ||
| 272 | } |
|
| 273 | ||
| 274 | add_filter( 'manage_feedback_posts_columns', 'grunion_post_type_columns_filter' ); |
|
| 275 | function grunion_post_type_columns_filter( $cols ) { |
|
| 276 | $cols = array( |
|
| 277 | 'cb' => '<input type="checkbox" />', |
|
| 278 | 'feedback_from' => __( 'From', 'jetpack' ), |
|
| 279 | 'feedback_message' => __( 'Message', 'jetpack' ), |
|
| 280 | 'feedback_date' => __( 'Date', 'jetpack' ) |
|
| 281 | ); |
|
| 282 | ||
| 283 | return $cols; |
|
| 284 | } |
|
| 285 | ||
| 286 | add_action( 'manage_posts_custom_column', 'grunion_manage_post_columns', 10, 2 ); |
|
| 287 | function grunion_manage_post_columns( $col, $post_id ) { |
|