function accept() { global $_qa_votes; $_qa_votes->handle_accepting(); $id = $_POST['answer_id']; the_answer_accepted($id); die; }
function the_answer_voting($answer_id) { list($up, $down, $current) = qa_get_votes($answer_id); $buttons = array('up' => __('This answer is useful (click again to undo)', QA_TEXTDOMAIN), 'down' => __('This answer is not useful (click again to undo)', QA_TEXTDOMAIN)); foreach ($buttons as $type => $text) { $buttons[$type] = $GLOBALS['_qa_votes']->get_link($answer_id, $type, $current, $text); } ?> <div class="qa-voting-box"> <?php echo $buttons['up']; ?> <span title="<?php _e('Score', QA_TEXTDOMAIN); ?> "><?php echo number_format_i18n($up - $down); ?> </span> <?php echo $buttons['down']; ?> <?php the_answer_accepted($answer_id); ?> </div> <?php }