function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', $instance['title']); $appearance = $instance['appearance']; $appearance = $appearance ? $appearance : 'medium_icon'; $float = esc_attr($instance['float']); $text = $instance['text']; $text_position = $instance['text_position']; $show_posts = $instance['show_posts']; $posts_position = $instance['posts_position']; $posts_limit = (int) $instance['posts_limit']; $codec = new Wdgpo_Codec(); echo $before_widget; if ($title) { echo $before_title . $title . $after_title; } $args = array('appearance' => $appearance); if ($float) { $args['float'] = $float; } if ($show_posts && 'before' == $posts_position) { $this->_show_posts($posts_limit); } if ($text && 'before' == $text_position) { echo $text; } echo $codec->process_gplus_page_code($args); if ($text && 'after' == $text_position) { echo $text; } if ($float) { echo "<div style='clear:{$float}'></div>"; } if ($show_posts && 'after' == $posts_position) { $this->_show_posts($posts_limit); } echo $after_widget; }