function widget($args, $instance)
 {
     extract($args, EXTR_SKIP);
     echo $before_widget;
     $items = empty($instance['items']) ? ' ' : apply_filters('widget_title', $instance['items']);
     if (!is_numeric($items)) {
         $items = 3;
     }
     if (!empty($items)) {
         pp_posts('popular', $items, TRUE);
     }
     echo $after_widget;
 }
function popular_posts_func($atts)
{
    //extract short code attr
    extract(shortcode_atts(array('items' => 3), $atts));
    $return_html = pp_posts('poopular', $items, FALSE, 'black', FALSE);
    return $return_html;
}