'primebulletin_social_widget', 'description' => esc_html__('Displays Social share.', 'primebulletin'), 'customize_selective_refresh' => true, ); $fields = array( 'title' => array( 'label' => esc_html__('Title:', 'primebulletin'), 'type' => 'text', 'class' => 'widefat', ), 'url-fb' => array( 'label' => esc_html__('Facebook URL:', 'primebulletin'), 'type' => 'url', 'class' => 'widefat', ), 'url-tw' => array( 'label' => esc_html__('Twitter URL:', 'primebulletin'), 'type' => 'url', 'class' => 'widefat', ), 'url-lt' => array( 'label' => esc_html__('Linkedin URL:', 'primebulletin'), 'type' => 'url', 'class' => 'widefat', ), 'url-ig' => array( 'label' => esc_html__('Instagram URL:', 'primebulletin'), 'type' => 'url', 'class' => 'widefat', ), 'url-pt' => array( 'label' => esc_html__('Pinterest URL:', 'primebulletin'), 'type' => 'url', 'class' => 'widefat', ), 'url-rt' => array( 'label' => esc_html__('Reddit URL:', 'primebulletin'), 'type' => 'url', 'class' => 'widefat', ), 'url-sk' => array( 'label' => esc_html__('Skype URL:', 'primebulletin'), 'type' => 'url', 'class' => 'widefat', ), 'url-sc' => array( 'label' => esc_html__('Snapchat URL:', 'primebulletin'), 'type' => 'url', 'class' => 'widefat', ), 'url-tr' => array( 'label' => esc_html__('Tumblr URL:', 'primebulletin'), 'type' => 'url', 'class' => 'widefat', ), 'url-th' => array( 'label' => esc_html__('Twitch URL:', 'primebulletin'), 'type' => 'url', 'class' => 'widefat', ), 'url-yt' => array( 'label' => esc_html__('Youtube URL:', 'primebulletin'), 'type' => 'url', 'class' => 'widefat', ), 'url-vo' => array( 'label' => esc_html__('Vimeo URL:', 'primebulletin'), 'type' => 'url', 'class' => 'widefat', ), 'url-wa' => array( 'label' => esc_html__('Whatsapp URL:', 'primebulletin'), 'type' => 'url', 'class' => 'widefat', ), 'url-wp' => array( 'label' => esc_html__('WordPress URL:', 'primebulletin'), 'type' => 'url', 'class' => 'widefat', ), 'url-gh' => array( 'label' => esc_html__('Github URL:', 'primebulletin'), 'type' => 'url', 'class' => 'widefat', ), 'url-fs' => array( 'label' => esc_html__('FourSquare URL:', 'primebulletin'), 'type' => 'url', 'class' => 'widefat', ), 'url-db' => array( 'label' => esc_html__('Dribbble URL:', 'primebulletin'), 'type' => 'url', 'class' => 'widefat', ), 'url-vk' => array( 'label' => esc_html__('VK URL:', 'primebulletin'), 'type' => 'url', 'class' => 'widefat', ), ); parent::__construct('primebulletin-social-layout', esc_html__('PrimeBulletin: Sidebar Social Widget', 'primebulletin'), $opts, array(), $fields); } /** * Outputs the content for the current widget instance. * * @param array $args Display arguments. * @param array $instance Settings for the current widget instance. * @since 1.0.0 * */ function widget($args, $instance) { $params = $this->get_params($instance); echo $args['before_widget']; if (!empty($params['title'])) { echo $args['before_title'] . esc_html($params['title']) . $args['after_title']; } ?>