'asterisk_lite_social_icon_widget', 'description' => esc_html__('Display social icon. You can enable and manage settings from Customizer -> Theme Option.', 'asterisk-lite'), 'customize_selective_refresh' => true, ); $fields = array( 'display_style' => array( 'label' => esc_html__('Layout:', 'asterisk-lite'), 'type' => 'select', 'default' => 'layout-1', 'options' => array( 'layout-1' => esc_html__('Layout One','asterisk-lite'), 'layout-2' => esc_html__('Layout Two','asterisk-lite'), ), ), ); parent::__construct( 'asterisk-lite-social-icon', esc_html__('Devs: Social Icon Widget', 'asterisk-lite'), $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']; $display_style = isset( $params['display_style'] ) ? $params['display_style'] : ''; asterisk_lite_social_icon( $display_style, $social_label = true ); echo $args['after_widget']; } } endif;