'maizzy_social_widget', 'description' => esc_html__('Displays Social share.', 'maizzy'), 'customize_selective_refresh' => true, ); $fields = array( 'title' => array( 'label' => esc_html__('Title:', 'maizzy'), 'type' => 'text', 'class' => 'widefat', ), 'url-fb' => array( 'label' => esc_html__('Facebook URL:', 'maizzy'), 'type' => 'url', 'class' => 'widefat', ), 'url-tw' => array( 'label' => esc_html__('Twitter URL:', 'maizzy'), 'type' => 'url', 'class' => 'widefat', ), 'url-lt' => array( 'label' => esc_html__('Linkedin URL:', 'maizzy'), 'type' => 'url', 'class' => 'widefat', ), 'url-ig' => array( 'label' => esc_html__('Instagram URL:', 'maizzy'), 'type' => 'url', 'class' => 'widefat', ), 'url-pt' => array( 'label' => esc_html__('Pinterest URL:', 'maizzy'), 'type' => 'url', 'class' => 'widefat', ), 'url-rt' => array( 'label' => esc_html__('Reddit URL:', 'maizzy'), 'type' => 'url', 'class' => 'widefat', ), 'url-sk' => array( 'label' => esc_html__('Skype URL:', 'maizzy'), 'type' => 'url', 'class' => 'widefat', ), 'url-sc' => array( 'label' => esc_html__('Snapchat URL:', 'maizzy'), 'type' => 'url', 'class' => 'widefat', ), 'url-tr' => array( 'label' => esc_html__('Tumblr URL:', 'maizzy'), 'type' => 'url', 'class' => 'widefat', ), 'url-th' => array( 'label' => esc_html__('Twitch URL:', 'maizzy'), 'type' => 'url', 'class' => 'widefat', ), 'url-yt' => array( 'label' => esc_html__('Youtube URL:', 'maizzy'), 'type' => 'url', 'class' => 'widefat', ), 'url-vo' => array( 'label' => esc_html__('Vimeo URL:', 'maizzy'), 'type' => 'url', 'class' => 'widefat', ), 'url-wa' => array( 'label' => esc_html__('Whatsapp URL:', 'maizzy'), 'type' => 'url', 'class' => 'widefat', ), 'url-wp' => array( 'label' => esc_html__('WordPress URL:', 'maizzy'), 'type' => 'url', 'class' => 'widefat', ), 'url-gh' => array( 'label' => esc_html__('Github URL:', 'maizzy'), 'type' => 'url', 'class' => 'widefat', ), 'url-fs' => array( 'label' => esc_html__('FourSquare URL:', 'maizzy'), 'type' => 'url', 'class' => 'widefat', ), 'url-db' => array( 'label' => esc_html__('Dribbble URL:', 'maizzy'), 'type' => 'url', 'class' => 'widefat', ), 'url-vk' => array( 'label' => esc_html__('VK URL:', 'maizzy'), 'type' => 'url', 'class' => 'widefat', ), ); parent::__construct( 'maizzy-social-layout', esc_html__('MP: Social Widget', 'maizzy'), $opts, array(), $fields ); } /** * Outputs the content for the current widget instance. * * @since 1.0.0 * * @param array $args Display arguments. * @param array $instance Settings for the current widget instance. */ 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']; } ?>