<?php /* Template Name: Questions bump */
get_header();
	$question_bump = askme_options("question_bump");
	$active_points = askme_options("active_points");
	if ($question_bump == 1 && $active_points == 1) {
		$paged = askme_paged();
		$block_users = askme_options("block_users");
		if ($block_users == 1) {
			$user_get_current_user_id = get_current_user_id();
			if ($user_get_current_user_id > 0) {
				$get_block_users = get_user_meta($user_get_current_user_id,"askme_block_users",true);
				if (is_array($get_block_users) && !empty($get_block_users)) {
					$author__not_in = array("author__not_in" => $get_block_users);
				}
			}
		}
		$args = array_merge($author__not_in,array("paged" => $paged,"post_type" => ask_questions_type,"posts_per_page" => get_option("posts_per_page"),'orderby' => array('question_points_order' => "DESC"),"meta_query" => array('question_points_order' => array('type' => 'numeric',"key" => "question_points","value" => 0,"compare" => ">="))));
		add_filter('posts_where', 'ask_filter_where');
		query_posts($args);
	}
	if ($question_bump == 1) {
		$question_bump_template = true;
		get_template_part("loop-question");
		vpanel_pagination();
		remove_filter( 'posts_where', 'ask_filter_where' );
		wp_reset_query();
	}else {
		echo "<div class='page-content page-content-user'><p class='no-item'>".__("This page is not active .","vbegy")."</p></div>";
	}
get_footer();?>