function widget($args, $instance) { extract($args); $title = empty($instance['title']) ? __("Recent Forum Posts", "sforum") : $instance['title']; $limit = empty($instance['limit']) ? 5 : $instance['limit']; $forum = empty($instance['forum']) ? 0 : $instance['forum']; $user = empty($instance['user']) ? 0 : $instance['user']; $postdate = empty($instance['postdate']) ? 0 : $instance['postdate']; $posttime = empty($instance['posttime']) ? 0 : $instance['posttime']; $idlist = empty($instance['idlist']) ? 0 : $instance['idlist']; # generate output echo $before_widget . $before_title . $title . $after_title . "<ul class='sftagul'>"; sf_recent_posts_tag($limit, $forum, $user, $postdate, true, $idlist, $posttime); echo "</ul>" . $after_widget; }
function web_forum($args) { extract($args); $options = get_option('web_forum'); $title = empty($options['title']) ? __('Forum', 'post-thumb') : $options['title']; ?> <?php echo $before_widget; ?> <?php echo $before_title . $title . $after_title; ?> <ul> <?php sf_recent_posts_tag(); ?> </ul> <?php echo $after_widget; }