function jobman_comments($iid, $editable = false) { if ($editable) { ?> <form action="" method="post"> <input type="hidden" name="interview" value="<?php echo $iid; ?> " /> <textarea class="large-text code" name="comment"></textarea> <input type="submit" name="submit" value="<?php _e('Comment', 'jobman'); ?> " /> </form> <?php } $comments = get_comments("post_id={$iid}"); jobman_display_comments($comments); }
function jobman_interview_past_comments($current_iid, $aid) { $interviews = get_post_meta($aid, 'interview', false); foreach ($interviews as $iid) { if ($iid != $current_iid) { $comments = get_comments("post_id={$iid}"); $interview = get_post($iid); $rating = get_post_meta($iid, 'rating', true); echo '<strong>' . date('Y-m-d H:i', strtotime($interview->post_date)) . '</strong><br/>'; jobman_print_rating_stars($interview->ID, $rating, NULL, true); jobman_display_comments($comments); } } }