public function __construct() { $this->get_api_setting(); $this->set_def_connection(); $this->add_rewrite_rules(); $this->cron_setup(); if (self::$defconnection['dbtype'] == 'remote') { self::$pushdb = new wpdb(self::$defconnection['dbuser'], self::$defconnection['dbpass'], self::$defconnection['dbname'], self::$defconnection['dbhost']); if (!self::$pushdb) { $this->output(0, 'Connecting with the remote push notification database is failed'); } } else { global $wpdb; self::$pushdb = $wpdb; } self::$pushdb->hide_errors(); }