__( 'Social Share Buttons' , 'essb' ), 'classname' => $this->widget_slug."-class" ); parent::__construct( false , __( 'Easy Social Share Buttons: Share Buttons' , 'essb' ) , $options ); } function widget( $args, $instance ) { global $essb_networks; extract( $args ); $essb_w_counter = $instance['essb_w_counter'] ; $essb_w_totalcounter = $instance['essb_w_totalcounter'] ; $essb_w_fixed = $instance['essb_w_fixed'] ; $essb_w_style = $instance['essb_w_style'] ; $essb_w_width = $instance['essb_w_width'] ; $essb_w_template = isset($instance['essb_w_template']) ? $instance['essb_w_template'] : ''; $essb_w_nospace = isset($instance['essb_w_nospace']) ? $instance['essb_w_nospace'] : ''; $essb_w_native = isset($instance['essb_w_native']) ? $instance['essb_w_native'] : ''; $essb_w_align = isset($instance['essb_w_align']) ? $instance['essb_w_align'] : 'left'; $title = isset($instance['title']) ? $instance['title'] : ''; $custom_list = isset($instance['custom_list']) ? $instance['custom_list'] : ''; $essb_w_force = $instance['essb_w_force']; $options = array();//get_option ( EasySocialShareButtons::$plugin_settings_name ); $buttons = ""; if (is_array($essb_networks)) { foreach ( $essb_networks as $k => $v ) { $display_name = isset ( $v ['name'] ) ? $v ['name'] : $k; if (trim($display_name) == "") { $display_name = $k; } $is_active = ( isset($instance['essb_w_'.$k]) ) ? esc_attr($instance['essb_w_'.$k]): ''; if ($is_active == "1") { if ($buttons != '') { $buttons .= ","; } $buttons .= $k; } } } if ($custom_list != '') { $buttons = $custom_list; } $native_state = "no"; if ($essb_w_native) { $native_state = "yes"; } $shortcode = '[easy-social-share buttons="'.$buttons.'" native="'.$native_state.'"'; if ($essb_w_counter == "no") { $shortcode .= " counters=0"; } else { $shortcode .= " counters=1"; } if ($essb_w_force) { $shortcode .= ' forceurl="yes"'; } $shortcode .= ' counters_pos="'.$essb_w_counter.'"'; $shortcode .= ' total_counter_pos="'.$essb_w_totalcounter.'"'; if ($essb_w_nospace != '') { $shortcode .= ' nospace="'.$essb_w_nospace.'"'; } if ($essb_w_totalcounter == "no") { $shortcode .= ' hide_total="yes"'; } if (!empty($essb_w_style)) { $shortcode .= ' style="'.$essb_w_style.'"'; } if ($essb_w_fixed) { $shortcode .= ' fixedwidth="yes"'; } if ($essb_w_width != '') { $shortcode .= ' fixedwidth_px="'.$essb_w_width.'"'; } if ($essb_w_template != '') { $shortcode .= ' template="'.$essb_w_template.'"'; } $shortcode .= ']'; //echo $before_widget; if (!empty($title)) { echo $before_widget . $before_title . $title . $after_title; } if ($essb_w_align != 'left') { echo '
/>
type="checkbox" />
type="checkbox" />
type="checkbox" />
type="checkbox" />