コード例 #1
0
ファイル: answer-loop.php プロジェクト: troe/anspress
/**
 * Get vote class of active answer
 * @return string
 */
function ap_answer_get_the_vote_class()
{
    $vote = ap_answer_get_the_net_vote();
    if ($vote > 0) {
        return 'positive';
    } elseif ($vote < 0) {
        return 'negative';
    }
}
コード例 #2
0
ファイル: list-answer.php プロジェクト: alaershov/anspress
<div class="ap-user-posts-item clearfix">
	<a class="ap-user-posts-vcount ap-tip<?php 
echo ap_question_best_answer_selected() ? ' answer-selected' : '';
?>
" href="<?php 
ap_answer_the_permalink();
?>
" title="<?php 
_e('Votes', 'anspress-question-answer');
?>
">
		<?php 
echo ap_icon('thumb-up', true);
?>
		<?php 
echo ap_answer_get_the_net_vote();
?>
	</a>
	<span class="ap-user-posts-active">
		<?php 
ap_answer_the_active_ago();
?>
	</span>
	<div class="no-overflow">
		<a href="<?php 
ap_answer_the_permalink();
?>
" class="ap-user-posts-title"><?php 
the_title();
?>
</a>