function nh_display_vote_link($content) { global $nh_options, $post; if (is_singular()) { if (isset($nh_options['vote_text']) && $nh_options['vote_text'] != '') { $link_text = $nh_options['vote_text']; } else { // $link_text = __('Vote', 'vote'); $link_text = 'Vote'; } if (isset($nh_options['already_voted']) && $nh_options['already_voted'] != '') { $already_voted = $nh_options['already_voted']; } else { $already_voted = __('You already voted for this', 'vote'); } $link = nh_vote_it_link($post->ID, $link_text, $already_voted, false); if (isset($nh_options['post_position']) && $nh_options['post_position'] == 'top') { $content = $link . $content; } else { $content = $content . $link; } } return $content; }
} else { while ($fdbk_query->have_posts()) { $fdbk_query->the_post(); ?> <li class="fdbk-list" id="post-<?php echo $post->ID; ?> "> <div class="vote-btn"> <?php if (is_user_logged_in()) { if (nh_user_has_voted_post($current_user->ID, $post->ID)) { echo '<span class="byline"><a id="votedthis" title="See your other Votes" href="' . $app_url . '/author/' . $current_user->user_login . '" class="votedthis nhline">You voted</a></span>'; } else { nh_vote_it_link(); } } ?> </div> <div class="vote-question"><strong><a class="nhline" href="<?php the_permalink(); ?> " title="See <?php echo the_title(); ?> "><?php the_title(); ?> </a></strong> <p class="comment-meta"><span class="byline"><?php