/**
  * @param array $socials
  * @return array
  */
 public static function get_sort_socials_selected($socials = array())
 {
     if (count($socials) == 0) {
         $socials = HW_SocialShare_widget::$socials_button;
     }
     $order_socials = hwss_option('socials_button_hidden');
     $order_socials = explode(',', $order_socials);
     $result = $socials;
     return HW_SocialShare_widget::order_assoc_array_base_other($order_socials, $result);
 }
 /**
  * constructor
  */
 public function __construct()
 {
     parent::__construct('hwss', __('Nút Chia sẻ  - Hoangweb', 'hwss'), array('description' => __('Các nút chia sẻ facebook, google+,twitter..', 'hwss')));
     //you should check if whether this widget actived on frontend or neither maybe you can get widget data by get_option($this->option_name)
     #if(!is_admin() && !is_active_widget( false, false, $this->id_base, true)) return; //don't we need using the_widget function to clone this widget
     self::$socials_button = $this->socials = array('facebook_share' => 'Facebook Share', 'facebook_like' => 'Facebook Like', 'facebook_recommend_button' => 'Facebook Recommend Button', 'googleplus' => 'Google +', 'twitter' => 'Twitter', 'twitter_follow_button' => 'Twitter Follow Button', 'linkedin' => 'LinkedIn', 'pinterest' => 'Pinterest');
     //socials service
     //sharing services
     self::$sharing_services = $this->services = array('addthis' => array('text' => 'AddThis', 'enable' => true), 'sharethis' => array('text' => 'Sharethis', 'enable' => false), 'socialite' => array('text' => 'Socialite', 'description' => 'Lazy load socials button.', 'enable' => true));
     add_action('admin_enqueue_scripts', array(&$this, '_admin_init_style_script'), 10, 3);
     add_action('wp_enqueue_scripts', array(&$this, '_init_style_script'));
 }