<?php 
        do_action('qa_before_question_summary');
        ?>
						<h3><?php 
        the_question_link();
        ?>
</h3>
						<?php 
        the_question_tags('<div class="question-tags">', ' ', '</div>');
        ?>
						<div class="question-started">
							<?php 
        the_qa_time(get_the_ID());
        ?>
							<?php 
        the_qa_user_link($post->post_author);
        ?>
						</div>
						<?php 
        do_action('qa_after_question_summary');
        ?>
					</div>
					<?php 
        do_action('qa_after_question');
        ?>
				</div>
				<?php 
        do_action('qa_after_question_loop');
        ?>
			<?php 
    }
Example #2
0
 function widget($args, $instance)
 {
     extract($args);
     $instance = $this->parse_instance($instance);
     if (!empty($instance['title'])) {
         $title = $instance['title'];
     }
     $title = apply_filters('widget_title', $title, $instance, $this->id_base);
     echo $before_widget;
     if ($title) {
         echo $before_title . $title . $after_title;
     }
     global $wpdb;
     $results = $wpdb->get_results("SELECT * FROM " . $wpdb->usermeta . " WHERE meta_key='_qa_rep' AND meta_value > 0  ORDER BY CONVERT(meta_value, SIGNED) DESC LIMIT " . $instance['number'] . " ");
     if ($results) {
         echo '<ul>';
         do_action('qa_reputation_widget_before', $results);
         foreach ($results as $result) {
             echo '<li class="qa-user-item">';
             the_qa_user_link($result->user_id);
             echo " (" . $result->meta_value . ")";
             echo '</li>';
         }
         do_action('qa_reputation_widget_after', $results);
         echo '</ul>';
     }
     echo $after_widget;
 }
Example #3
0
function the_qa_author_box($id)
{
    $user_id = get_post_field('post_author', $id);
    ?>
<div class="qa-user-box">
	<?php 
    echo get_avatar($user_id, 32);
    ?>
	<div class="qa-user-details">
		<?php 
    the_qa_user_link($user_id);
    ?>
		<?php 
    the_qa_user_rep($user_id);
    ?>
	</div>
</div>
<?php 
}