Esempio n. 1
0
 function widget($args, $instance)
 {
     extract($args);
     $title = apply_filters('widget_title', $instance['title']);
     $orderby = esc_attr($instance['orderby']);
     $questions_per_page = esc_attr($instance['questions_per_page']);
     $display_date = esc_attr($instance['display_date']);
     $display_image = esc_attr($instance['display_image']);
     $questions_excerpt = esc_attr($instance['questions_excerpt']);
     $excerpt_title = esc_attr($instance['excerpt_title']);
     $post_or_question = esc_attr($instance['post_or_question']);
     echo $before_widget;
     if ($title) {
         echo $before_title . esc_attr($title) . $after_title;
     }
     Vpanel_Questions($questions_per_page, $orderby, $display_date, $questions_excerpt, $post_or_question, $excerpt_title, $display_image);
     echo $after_widget;
 }
Esempio n. 2
0
    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', $instance['title']);
        $excerpts = esc_attr($instance['excerpts']);
        $posts_per_page_p = esc_attr($instance['posts_per_page_p']);
        $posts_per_page_r = esc_attr($instance['posts_per_page_r']);
        $comments_number = esc_attr($instance['comments_number']);
        $display_popular = esc_attr($instance['display_popular']);
        $display_recent = esc_attr($instance['display_recent']);
        $display_comments = esc_attr($instance['display_comments']);
        $post_or_question = esc_attr($instance['post_or_question']);
        $excerpt_title = esc_attr($instance['excerpt_title']);
        if ($display_popular == "on" || $display_recent == "on" || $display_comments == "on") {
            echo $before_widget . "<div class='widget_tabs tabs-warp'>";
            ?>
				<ul class="tabs">
					<?php 
            if ($display_popular == "on") {
                ?>
					<li class="tab"><a href="#"><?php 
                _e('Popular', 'vbegy');
                ?>
</a></li>
					<?php 
            }
            if ($display_recent == "on") {
                ?>
					<li class="tab"><a href="#"><?php 
                _e('Recent', 'vbegy');
                ?>
</a></li>
					<?php 
            }
            if ($display_comments == "on") {
                ?>
					<li class="tab"><a href="#"><?php 
                _e('Comments', 'vbegy');
                ?>
</a></li>
					<?php 
            }
            ?>
				</ul>
				<?php 
            if ($display_popular == "on") {
                echo "<div class='tab-inner-warp'><div class='tab-inner'>";
                Vpanel_Questions($posts_per_page_p, "popular", "on", $excerpts, $post_or_question, $excerpt_title);
                echo "</div></div>";
            }
            if ($display_recent == "on") {
                echo "<div class='tab-inner-warp'><div class='tab-inner'>";
                Vpanel_Questions($posts_per_page_r, "recent", "on", $excerpts, $post_or_question, $excerpt_title);
                echo "</div></div>";
            }
            if ($display_comments == "on") {
                echo "<div class='tab-inner-warp'><div class='tab-inner'>";
                Vpanel_comments($post_or_question, $comments_number, $excerpts);
                echo "</div></div>";
            }
            echo "</div>";
            echo $after_widget;
        }
    }