widget_cssclass = 'widget_applica_social_menu'; $this->widget_description = __("Displays social menu if you have set it.", 'applica'); $this->widget_id = 'applica_social_menu'; $this->widget_name = __('Applica: Social Menu', 'applica'); $this->settings = array( 'title' => array( 'type' => 'text', 'label' => __('Title', 'applica'), ), 'style' => array( 'type' => 'select', 'label' => __('Style', 'applica'), 'options' => array( 'style_1' => __('Style 1', 'applica'), 'style_2' => __('Style 2', 'applica'), 'style_3' => __('Style 3', 'applica'), ), 'std' => 'style_1', ), ); parent::__construct(); } /** * Output widget. * * @see WP_Widget * * @param array $args * @param array $instance */ public function widget($args, $instance) { ob_start(); $this->widget_start($args, $instance); do_action( 'applica_before_social_menu'); $style = $instance['style']; ?>
widget_end($args); echo ob_get_clean(); } }