/** * Function to instantiate our class and make it a singleton */ public static function getInstance() { if (!self::$instance) { self::$instance = new self(); } return self::$instance; }
public function widget($args, $instance) { $instance = $this->_getInstanceSettings($instance); $wpTwitterWidget = wpTwitterWidget::getInstance(); echo $wpTwitterWidget->display(wp_parse_args($instance, $args)); }