diff --git a/includes/Wpup/UpdateServer.php b/includes/Wpup/UpdateServer.php index ea6d333..fceceb4 100644 --- a/includes/Wpup/UpdateServer.php +++ b/includes/Wpup/UpdateServer.php @@ -224,15 +224,25 @@ protected function checkAuthorization($request) { } /** - * Create a download URL for a plugin. + * Create a download URL for a plugin based on a package object. * * @param Wpup_Package $package * @return string URL */ protected function generateDownloadUrl(Wpup_Package $package) { + return $this->getDownloadUrl($package->slug); + } + + /** + * Create a download URL for a plugin based on a slug. + * + * @param string $slug + * @return string URL + */ + public function getDownloadUrl($slug) { $query = array( 'action' => 'download', - 'slug' => $package->slug, + 'slug' => $slug, ); return self::addQueryArg($query, $this->serverUrl); }