static function custom_columns($column, $post_id) { switch ($column) { case 'namaste_course_visits': // get unique and total visits list($total, $unique) = NamasteTrack::get_visits('course', $post_id); echo $unique . ' / ' . $total; break; } }
static function custom_columns($column, $post_id) { switch ($column) { case 'namaste_course': $course_id = get_post_meta($post_id, "namaste_course", true); $course = get_post($course_id); echo '<a href="post.php?post=' . $course_id . '&action=edit">' . $course->post_title . '</a>'; break; case 'namaste_lesson_visits': // get unique and total visits list($total, $unique) = NamasteTrack::get_visits('lesson', $post_id); echo $unique . ' / ' . $total; break; } }