'AE_Link_Widget', 'description' => 'AE Link For Social Sign-on', ); parent::__construct('AE_Link_Widget', 'AE Link', $widget_ops); } /** * Outputs the content of the widget * * @param array $args * @param array $instance */ public function widget($args, $instance) { $text = $instance['text']; $type = $instance['type']; $service = $instance['service']; $return = $instance['return']; $show_after_login = $instance['show_after_login']; echo do_shortcode( '[ae-link type="' . $type . '" service="' . $service . '" return="' . $return . '" show_after_login="' . $show_after_login . '" ]' . $text . '[/ae-link]' ); } /** * Outputs the options form on admin * * @param array $instance The widget options */ public function form($instance) { // outputs the options form on admin $text = !empty($instance['text']) ? $instance['text'] : esc_html__('Sign In', 'text_domain'); ?>
get_active_social_services(); $default_socail = !empty($active_services) ? $active_services[0] : ''; $service = !empty($instance['service']) ? $instance['service'] : esc_html__($default_socail, 'text_domain'); ?>