function widget($args, $instance) { extract($args); global $wpdb; /* Before widget (defined by themes). */ echo $before_widget; extract($instance); /* Title of widget (before and after defined by themes). */ if ($title) { echo $before_title . $title . $after_title; } social_media_mashup($count); /* After widget (defined by themes). */ echo $after_widget; }
/** * [social-media-mashup count="5"] */ function smm_shortcode($atts) { extract(shortcode_atts(array('count' => 5), $atts)); return social_media_mashup($count, false); }