/**
  * Get singleton object for class Login_Radius_Shortcode
  *
  * @return object Login_Radius_Shortcode
  */
 public static function get_instance()
 {
     if (!isset(self::$instance) && !self::$instance instanceof Login_Radius_Shortcode) {
         self::$instance = new Login_Radius_Shortcode();
     }
     return self::$instance;
 }
 /**
  * Constructor which loads required files at front
  */
 private function __construct()
 {
     require_once LOGINRADIUS_PLUGIN_DIR . "public/inc/login/class-social-login.php";
     require_once LOGINRADIUS_PLUGIN_DIR . "public/inc/commenting/class-social-commenting.php";
     require_once LOGINRADIUS_PLUGIN_DIR . "public/inc/shortcodes/class-shortcode.php";
     Social_Login::get_instance();
     Social_Commenting::get_instance();
     Login_Radius_Shortcode::get_instance();
 }
 /**
  * Outputs the content of the widget
  *
  * @param array $args
  * @param array $instance
  */
 function widget($args, $instance)
 {
     if (!is_user_logged_in()) {
         return;
     }
     extract($args);
     echo $before_widget;
     if (!empty($instance['title'])) {
         $title = apply_filters('widget_title', $instance['title']);
         echo $before_title . $title . $after_title;
     }
     if (!empty($instance['before_widget_content'])) {
         echo $instance['before_widget_content'];
     }
     echo Login_Radius_Shortcode::linking_widget_shortcode();
     if (!empty($instance['after_widget_content'])) {
         echo $instance['after_widget_content'];
     }
     echo $after_widget;
 }