'arras_tabbed_sidebar', 'description' => __('Sidebar containing tabs that displays posts, comments and tags.', 'arras'), ); $this->WP_Widget('arras_tabbed_sidebar', __('Tabbed Sidebar', 'arras'), $widget_args); } function widget($args, $instance) { global $wpdb; extract($args, EXTR_SKIP); if (!$instance['order']) $instance['order'] = array('featured', 'latest', 'comments', 'tags'); if ($instance['display_home'] && !is_home()) return; $featured = arras_get_option('featured_cat'); ?>
  • '; $f = new WP_Query('showposts=8&cat=' . $featured); if (!$f->have_posts()) { echo '' . __('No posts at the moment. Check back again later!', 'arras') . ''; } else { echo '
    '; } break; case 'latest': echo '
    '; $f = new WP_Query('showposts=8'); if (!$f->have_posts()) { echo '' . __('No posts at the moment. Check back again later!', 'arras') . ''; } else { echo '
    '; break; case 'comments': echo '
    '; $comments = get_comments( array('status' => 'approve', 'number' => 8) ); if ($comments) { echo ''; } echo '
    '; break; case 'tags': echo '
    '; wp_tag_cloud('smallest=8&largest=18'); echo '
    '; break; case 'popular': echo ''; break; } } ?>
  • array('featured', 'latest', 'comments', 'tags'), 'display_home' => true ) ); $order = $instance['order']; ?>

    checked="checked" />





    Popularity Contest is enabled.', 'arras') ?>

    __('None', 'arras'), 'featured' => __('Featured Posts', 'arras'), 'latest' => __('Latest Posts', 'arras'), 'comments' => __('Recent Comments', 'arras'), 'tags' => __('Tag Cloud', 'arras') ); if ( function_exists('akpc_most_popular') ) { $opts['popular'] = __('Popular Posts', 'arras'); } if (!$selected) $selected = $default; foreach ( $opts as $id => $val ) { echo ''; } } function render_sidebar_tabs($order, $show_featured) { $order = array_unique($order); $list = array( 'latest' => __('Latest', 'arras'), 'comments' => __('Comments', 'arras'), 'tags' => __('Tag Cloud', 'arras'), 'popular' => __('Popular', 'arras') ); $count = 0; if ($show_featured) $list['featured'] = __('Featured', 'arras'); foreach ($order as $t) { if (!$show_featured) { if ($t == 'featured') continue; } if ($t != 'none') { ?>
  • 'arras_featured_stories', 'description' => __('Featured stories containing post thumbnails and the excerpt.', 'arras'), ); $this->WP_Widget('arras_featured_stories', __('Featured Stories', 'arras'), $widget_args); } function widget($args, $instance) { global $wpdb; extract($args, EXTR_SKIP); if ($instance['no_display_in_home'] && is_home()) return; $title = apply_filters('widget_title', $instance['title']); $cat = (int)strip_tags($instance['featured_cat']); echo $before_widget; echo $before_title . $title . $after_title; $r = new WP_Query( array('showposts' => $instance['postcount'], 'cat' => $cat) ); if ($r->have_posts()) { echo '