function widget($args, $instance) { extract($args); /* User-selected settings. */ $title = apply_filters('widget_title', $instance['title']); $username = $instance['username']; $show_count = $instance['show_count']; $hide_timestamp = isset($instance['hide_timestamp']) ? $instance['hide_timestamp'] : false; $linked = $instance['hide_url'] ? false : '#'; $show_follow = isset($instance['show_follow']) ? $instance['show_follow'] : false; $show_followers = isset($instance['show_followers']) ? $instance['show_followers'] : false; /* Before widget (defined by themes). */ echo $before_widget; /* Title of widget (before and after defined by themes). */ if ($title) { echo $before_title . $title . $after_title; } wpzoom_twitter_messages($username, $show_count, true, !$hide_timestamp, $linked); if ($show_follow) { echo '<div class="follow-user"><a href="https://twitter.com/' . $username . '" class="twitter-follow-button"'; if ($show_followers) { echo 'data-show-count="false"'; } echo '>Follow @' . $username . '</a><script src="//platform.twitter.com/widgets.js" type="text/javascript"></script></div>'; } /* After widget (defined by themes). */ echo $after_widget; }
function widget($args, $instance) { extract($args); /* User-selected settings. */ $title = apply_filters('widget_title', $instance['title']); $username = $instance['username']; $show_count = $instance['show_count']; $hide_timestamp = isset($instance['hide_timestamp']) ? $instance['hide_timestamp'] : false; $linked = $instance['hide_url'] ? false : '#'; $show_follow = isset($instance['show_follow']) ? $instance['show_follow'] : false; /* Before widget (defined by themes). */ echo $before_widget; /* Title of widget (before and after defined by themes). */ if ($title) { echo $before_title . $title . $after_title; } wpzoom_twitter_messages($username, $show_count, true, !$hide_timestamp, $linked); if ($show_follow) { echo '<div class="follow-user"><a href="http://twitter.com/' . $username . '">' . $instance['follow_text'] . '</a></div>'; } /* After widget (defined by themes). */ echo $after_widget; }