/** * Echo active question total vote * @return void * @since 2.1 */ function ap_question_the_net_vote() { if (!ap_opt('disable_voting_on_question')) { ?> <span class="ap-questions-count ap-questions-vcount"> <span><?php echo ap_question_get_the_net_vote(); ?> </span> <?php _e('votes', 'ap'); ?> </span> <?php } }
<div class="ap-questions-widget clearfix"> <?php if (ap_have_questions()) { /* Start the Loop */ while (ap_questions()) { ap_the_question(); $ans_count = ap_question_get_the_answer_count(); $net_vote = ap_question_get_the_net_vote(); ?> <div class="ap-question-item"> <a class="ap-question-title"href="<?php ap_question_the_permalink(); ?> "><?php the_title(); ?> </a> <span class="ap-ans-count"><?php printf(_n('1 answer', '%d answers', $ans_count, 'ap'), $ans_count); ?> </span> <span class="ap-vote-count"> | <?php printf(_n('1 vote', '%d votes', $net_vote, 'ap'), $net_vote); ?> </span> </div> <?php } } else { _e('No questions found.', 'ap'); }
<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_question_the_permalink(); ?> " title="<?php esc_attr_e('Votes', 'anspress-question-answer'); ?> "> <?php echo ap_icon('thumb-up', true); ?> <?php echo ap_question_get_the_net_vote(); ?> </a> <span class="ap-user-posts-active"> <?php ap_question_the_active_ago(); ?> </span> <a class="ap-user-posts-ccount ap-tip" href="<?php ap_question_the_permalink(); ?> " title="<?php esc_attr_e('Answers', 'anspress-question-answer'); ?> "> <?php