function get_urlshortener() { $urlshortener = new UrlShortener(); $bitlylogin = $this->get_config('announce_bitly_login'); $bitlyapikey = $this->get_config('announce_bitly_apikey'); $yourlsurl = $this->get_config('announce_yourls_url'); $yourlsapikey = $this->get_config('announce_yourls_apikey'); $piratlyapikey = $this->get_config('announce_piratly_apikey', '0'); $this->log("blogin:"******" bapi: " . $bitlyapikey); $urlshortener->setBitlyLogin($bitlylogin, $bitlyapikey); $this->log("slogin:"******" sapi: " . $urlshortener->bitly_apikey); $urlshortener->setPiratlyToken($piratlyapikey); $urlshortener->setYourlsLogin($yourlsurl, $yourlsapikey); return $urlshortener; }