/** * Define our custom columns shown in admin. * @param string $column */ public function custom_columns($column, $post_id) { switch ($column) { case 'sp_icon': echo has_post_thumbnail($post_id) ? edit_post_link(get_the_post_thumbnail($post_id, 'sportspress-fit-mini'), '', '', $post_id) : ''; break; case 'sp_key': global $post; echo $post->post_name; break; case 'sp_section': global $post; echo sp_get_post_section($post->ID); break; case 'sp_config_format': global $post; echo sp_get_post_format($post->ID); break; case 'sp_description': global $post; echo '<span class="description">' . $post->post_excerpt . '</span>'; break; } }
?> > <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><?php echo sp_get_post_section($row->ID); ?> </td> <?php if ('auto' === $columns) { ?> <td> <?php if ($visible) { ?> <i class="dashicons dashicons-yes"></i><?php } else { ?> <?php } ?>