/** * Displays the number of committed files and the commit hash for commits. * @access public * @param string $column The column to add. */ public function custom_columns($column) { global $post; $post_id = get_the_ID(); switch ($column) { case "hash": echo Revisr_Git::get_hash($post_id); break; case "branch": $branch_meta = get_post_meta($post_id, "branch"); if (isset($branch_meta[0])) { echo $branch_meta[0]; } break; case "tag": $tag_meta = get_post_meta($post_id, "git_tag"); if (isset($tag_meta[0])) { echo $tag_meta[0]; } break; case "files_changed": $files_meta = get_post_meta($post_id, "files_changed"); if (isset($files_meta[0])) { echo $files_meta[0]; } break; } }