__ ('Allow your visitors to login and register with social networks like Twitter, Facebook, LinkedIn, Hyves, Google and Yahoo.', 'oa_social_login') )); } /** * Display the widget */ public function widget ($args, $instance) { //Hide the widget for logged in users? if (empty ($instance ['widget_hide_for_logged_in_users']) OR ! is_user_logged_in ()) { //Before Widget echo $args ['before_widget']; //Title if ( !empty ($instance ['widget_title'])) { echo $args ['before_title'] . apply_filters ('widget_title', $instance ['widget_title']) . $args ['after_title']; } //Before Content if ( !empty ($instance ['widget_content_before'])) { echo $instance ['widget_content_before']; } //Content oa_social_login_render_login_form (array ( 'target' => 'widget' )); //After Content if ( !empty ($instance ['widget_content_after'])) { echo $instance ['widget_content_after']; } //After Widget echo $args ['after_widget']; } } /** * Show Widget Settings */ public function form ($instance) { //Default settings $default_settings = array ( 'widget_title' => __('Connect with').':', 'widget_content_before' => '', 'widget_content_after' => '', 'widget_hide_for_logged_in_users' => '1' ); foreach ($instance as $key => $value) { $instance [$key] = esc_attr ($value); } $instance = wp_parse_args ((array) $instance, $default_settings); ?>
/>