/** * Define our custom columns shown in admin. * @param string $column */ public function custom_columns($column, $post_id) { switch ($column) { case 'sp_key': global $post; echo $post->post_name; break; case 'sp_abbreviation': global $post; echo sp_get_post_abbreviation($post->ID); break; case 'sp_description': global $post; echo '<span class="description">' . $post->post_excerpt . '</span>'; break; } }
<tr<?php if ($i % 2 == 0) { echo ' class="alternate"'; } ?> > <td class="row-title"><?php echo $row->post_title; ?> </td> <td><code><?php echo $row->post_name; ?> </code></td> <td><?php echo sp_get_post_abbreviation($row->ID); ?> </td> <td><?php echo sp_get_post_condition($row->ID); ?> </td> <td><p class="description"><?php echo $row->post_excerpt; ?> </p></td> <td class="edit"><a class="button" href="<?php echo get_edit_post_link($row->ID); ?> "><?php _e('Edit', 'sportspress');