/** * 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_equation': echo sp_get_post_equation($post_id); break; case 'sp_precision': echo sp_get_post_precision($post_id); break; case 'sp_description': global $post; echo '<span class="description">' . $post->post_excerpt . '</span>'; break; } }
if ($data) { $i = 0; foreach ($data as $row) { ?> <tr<?php if ($i % 2 == 0) { echo ' class="alternate"'; } ?> > <td class="row-title"><?php echo $row->post_title; ?> </td> <td><?php echo sp_get_post_equation($row->ID); ?> </td> <td><?php echo sp_get_post_precision($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');
function prosports_get_post_equation($post_id) { return sp_get_post_equation($post_id); }
function sportspress_get_post_equation($post_id) { return sp_get_post_equation($post_id); }