diff --git a/Puc/v4/Factory.php b/Puc/v4/Factory.php index 62012076..3ab674c2 100644 --- a/Puc/v4/Factory.php +++ b/Puc/v4/Factory.php @@ -1,6 +1,6 @@ updateChecker = $updateChecker; @@ -150,11 +150,11 @@ private function getLibraryUrl($filePath) { $absolutePath = realpath(dirname(__FILE__) . '/../../../' . ltrim($filePath, '/')); //Where is the library located inside the WordPress directory structure? - $absolutePath = Puc_v4p3_Factory::normalizePath($absolutePath); + $absolutePath = Puc_v4p4_Factory::normalizePath($absolutePath); - $pluginDir = Puc_v4p3_Factory::normalizePath(WP_PLUGIN_DIR); - $muPluginDir = Puc_v4p3_Factory::normalizePath(WPMU_PLUGIN_DIR); - $themeDir = Puc_v4p3_Factory::normalizePath(get_theme_root()); + $pluginDir = Puc_v4p4_Factory::normalizePath(WP_PLUGIN_DIR); + $muPluginDir = Puc_v4p4_Factory::normalizePath(WPMU_PLUGIN_DIR); + $themeDir = Puc_v4p4_Factory::normalizePath(get_theme_root()); if ( (strpos($absolutePath, $pluginDir) === 0) || (strpos($absolutePath, $muPluginDir) === 0) ) { //It's part of a plugin. diff --git a/Puc/v4p3/DebugBar/Panel.php b/Puc/v4p4/DebugBar/Panel.php similarity index 96% rename from Puc/v4p3/DebugBar/Panel.php rename to Puc/v4p4/DebugBar/Panel.php index 6a1ebbea..728eb809 100644 --- a/Puc/v4p3/DebugBar/Panel.php +++ b/Puc/v4p4/DebugBar/Panel.php @@ -1,9 +1,9 @@ '; diff --git a/Puc/v4p3/DebugBar/PluginExtension.php b/Puc/v4p4/DebugBar/PluginExtension.php similarity index 75% rename from Puc/v4p3/DebugBar/PluginExtension.php rename to Puc/v4p4/DebugBar/PluginExtension.php index f436debf..f8faf33f 100644 --- a/Puc/v4p3/DebugBar/PluginExtension.php +++ b/Puc/v4p4/DebugBar/PluginExtension.php @@ -1,12 +1,12 @@ pluginFile, array($scheduler, 'removeUpdaterCron')); return $scheduler; } @@ -135,13 +135,13 @@ public function removeHooks() { * @uses wp_remote_get() * * @param array $queryArgs Additional query arguments to append to the request. Optional. - * @return Puc_v4p3_Plugin_Info + * @return Puc_v4p4_Plugin_Info */ public function requestInfo($queryArgs = array()) { - list($pluginInfo, $result) = $this->requestMetadata('Puc_v4p3_Plugin_Info', 'request_info', $queryArgs); + list($pluginInfo, $result) = $this->requestMetadata('Puc_v4p4_Plugin_Info', 'request_info', $queryArgs); if ( $pluginInfo !== null ) { - /** @var Puc_v4p3_Plugin_Info $pluginInfo */ + /** @var Puc_v4p4_Plugin_Info $pluginInfo */ $pluginInfo->filename = $this->pluginFile; $pluginInfo->slug = $this->slug; } @@ -155,7 +155,7 @@ public function requestInfo($queryArgs = array()) { * * @uses PluginUpdateChecker::requestInfo() * - * @return Puc_v4p3_Update|null An instance of Plugin_Update, or NULL when no updates are available. + * @return Puc_v4p4_Update|null An instance of Plugin_Update, or NULL when no updates are available. */ public function requestUpdate() { //For the sake of simplicity, this function just calls requestInfo() @@ -164,7 +164,7 @@ public function requestUpdate() { if ( $pluginInfo === null ){ return null; } - $update = Puc_v4p3_Plugin_Update::fromPluginInfo($pluginInfo); + $update = Puc_v4p4_Plugin_Update::fromPluginInfo($pluginInfo); $update = $this->filterUpdateResult($update); @@ -351,12 +351,12 @@ public function isBeingUpgraded($upgrader = null) { * Uses cached update data. To retrieve update information straight from * the metadata URL, call requestUpdate() instead. * - * @return Puc_v4p3_Plugin_Update|null + * @return Puc_v4p4_Plugin_Update|null */ public function getUpdate() { $update = parent::getUpdate(); if ( isset($update) ) { - /** @var Puc_v4p3_Plugin_Update $update */ + /** @var Puc_v4p4_Plugin_Update $update */ $update->filename = $this->pluginFile; } return $update; @@ -733,7 +733,7 @@ public function addResultFilter($callback) { } protected function createDebugBarExtension() { - return new Puc_v4p3_DebugBar_PluginExtension($this); + return new Puc_v4p4_DebugBar_PluginExtension($this); } } diff --git a/Puc/v4p3/Scheduler.php b/Puc/v4p4/Scheduler.php similarity index 96% rename from Puc/v4p3/Scheduler.php rename to Puc/v4p4/Scheduler.php index df5262dd..4fa1e6db 100644 --- a/Puc/v4p3/Scheduler.php +++ b/Puc/v4p4/Scheduler.php @@ -1,11 +1,11 @@ lazyLoad(); @@ -73,10 +73,10 @@ public function getUpdate() { } /** - * @param Puc_v4p3_Update|null $update + * @param Puc_v4p4_Update|null $update * @return $this */ - public function setUpdate(Puc_v4p3_Update $update = null) { + public function setUpdate(Puc_v4p4_Update $update = null) { $this->lazyLoad(); $this->update = $update; return $this; @@ -138,7 +138,7 @@ public function save() { $updateClass = get_class($this->update); $state->updateClass = $updateClass; $prefix = $this->getLibPrefix(); - if ( Puc_v4p3_Utils::startsWith($updateClass, $prefix) ) { + if ( Puc_v4p4_Utils::startsWith($updateClass, $prefix) ) { $state->updateBaseClass = substr($updateClass, strlen($prefix)); } } @@ -169,8 +169,8 @@ protected function load() { return; } - $this->lastCheck = intval(Puc_v4p3_Utils::get($state, 'lastCheck', 0)); - $this->checkedVersion = Puc_v4p3_Utils::get($state, 'checkedVersion', ''); + $this->lastCheck = intval(Puc_v4p4_Utils::get($state, 'lastCheck', 0)); + $this->checkedVersion = Puc_v4p4_Utils::get($state, 'checkedVersion', ''); $this->update = null; if ( isset($state->update) ) { diff --git a/Puc/v4p3/Theme/Update.php b/Puc/v4p4/Theme/Update.php similarity index 89% rename from Puc/v4p3/Theme/Update.php rename to Puc/v4p4/Theme/Update.php index eae84ae2..5a43e11b 100644 --- a/Puc/v4p3/Theme/Update.php +++ b/Puc/v4p4/Theme/Update.php @@ -1,8 +1,8 @@ requestMetadata('Puc_v4p3_Theme_Update', 'request_update'); + list($themeUpdate, $result) = $this->requestMetadata('Puc_v4p4_Theme_Update', 'request_update'); if ( $themeUpdate !== null ) { - /** @var Puc_v4p3_Theme_Update $themeUpdate */ + /** @var Puc_v4p4_Theme_Update $themeUpdate */ $themeUpdate->slug = $this->slug; } @@ -86,10 +86,10 @@ public function getAbsoluteDirectoryPath() { * Create an instance of the scheduler. * * @param int $checkPeriod - * @return Puc_v4p3_Scheduler + * @return Puc_v4p4_Scheduler */ protected function createScheduler($checkPeriod) { - return new Puc_v4p3_Scheduler($this, $checkPeriod, array('load-themes.php')); + return new Puc_v4p4_Scheduler($this, $checkPeriod, array('load-themes.php')); } /** @@ -103,7 +103,7 @@ public function isBeingUpgraded($upgrader = null) { } protected function createDebugBarExtension() { - return new Puc_v4p3_DebugBar_Extension($this, 'Puc_v4p3_DebugBar_ThemePanel'); + return new Puc_v4p4_DebugBar_Extension($this, 'Puc_v4p4_DebugBar_ThemePanel'); } /** diff --git a/Puc/v4p3/Update.php b/Puc/v4p4/Update.php similarity index 84% rename from Puc/v4p3/Update.php rename to Puc/v4p4/Update.php index 9b614837..af66eb28 100644 --- a/Puc/v4p3/Update.php +++ b/Puc/v4p4/Update.php @@ -1,5 +1,5 @@ scheduler = $this->createScheduler($checkPeriod); - $this->upgraderStatus = new Puc_v4p3_UpgraderStatus(); - $this->updateState = new Puc_v4p3_StateStore($this->optionName); + $this->upgraderStatus = new Puc_v4p4_UpgraderStatus(); + $this->updateState = new Puc_v4p4_StateStore($this->optionName); if ( did_action('init') ) { $this->loadTextDomain(); @@ -199,14 +199,14 @@ public function allowMetadataHost($allow, $host) { * and substitute their own scheduler. * * @param int $checkPeriod - * @return Puc_v4p3_Scheduler + * @return Puc_v4p4_Scheduler */ abstract protected function createScheduler($checkPeriod); /** * Check for updates. The results are stored in the DB option specified in $optionName. * - * @return Puc_v4p3_Update|null + * @return Puc_v4p4_Update|null */ public function checkForUpdates() { $installedVersion = $this->getInstalledVersion(); @@ -240,7 +240,7 @@ public function checkForUpdates() { /** * Load the update checker state from the DB. * - * @return Puc_v4p3_StateStore + * @return Puc_v4p4_StateStore */ public function getUpdateState() { return $this->updateState->lazyLoad(); @@ -265,7 +265,7 @@ public function resetUpdateState() { * Uses cached update data. To retrieve update information straight from * the metadata URL, call requestUpdate() instead. * - * @return Puc_v4p3_Update|null + * @return Puc_v4p4_Update|null */ public function getUpdate() { $update = $this->updateState->getUpdate(); @@ -286,16 +286,16 @@ public function getUpdate() { * * Subclasses should run the update through filterUpdateResult before returning it. * - * @return Puc_v4p3_Update An instance of Update, or NULL when no updates are available. + * @return Puc_v4p4_Update An instance of Update, or NULL when no updates are available. */ abstract public function requestUpdate(); /** * Filter the result of a requestUpdate() call. * - * @param Puc_v4p3_Update|null $update + * @param Puc_v4p4_Update|null $update * @param array|WP_Error|null $httpResult The value returned by wp_remote_get(), if any. - * @return Puc_v4p3_Update + * @return Puc_v4p4_Update */ protected function filterUpdateResult($update, $httpResult = null) { //Let plugins/themes modify the update. @@ -494,7 +494,7 @@ protected function shouldShowUpdates() { * @param string $metaClass Parse the JSON as an instance of this class. It must have a static fromJson method. * @param string $filterRoot * @param array $queryArgs Additional query arguments. - * @return array [Puc_v4p3_Metadata|null, array|WP_Error] A metadata instance and the value returned by wp_remote_get(). + * @return array [Puc_v4p4_Metadata|null, array|WP_Error] A metadata instance and the value returned by wp_remote_get(). */ protected function requestMetadata($metaClass, $filterRoot, $queryArgs = array()) { //Query args to append to the URL. Plugins can add their own by using a filter callback (see addQueryArgFilter()). @@ -879,13 +879,13 @@ public function maybeInitDebugBar() { } protected function createDebugBarExtension() { - return new Puc_v4p3_DebugBar_Extension($this); + return new Puc_v4p4_DebugBar_Extension($this); } /** * Display additional configuration details in the Debug Bar panel. * - * @param Puc_v4p3_DebugBar_Panel $panel + * @param Puc_v4p4_DebugBar_Panel $panel */ public function onDisplayConfiguration($panel) { //Do nothing. Subclasses can use this to add additional info to the panel. diff --git a/Puc/v4p3/UpgraderStatus.php b/Puc/v4p4/UpgraderStatus.php similarity index 98% rename from Puc/v4p3/UpgraderStatus.php rename to Puc/v4p4/UpgraderStatus.php index 335021ad..14194d8b 100644 --- a/Puc/v4p3/UpgraderStatus.php +++ b/Puc/v4p4/UpgraderStatus.php @@ -1,5 +1,5 @@ $branch->name, 'updated' => $branch->target->date, 'downloadUrl' => $this->getDownloadUrl($branch->name), @@ -70,7 +70,7 @@ public function getBranch($branchName) { * Get a specific tag. * * @param string $tagName - * @return Puc_v4p3_Vcs_Reference|null + * @return Puc_v4p4_Vcs_Reference|null */ public function getTag($tagName) { $tag = $this->api('/refs/tags/' . $tagName); @@ -78,7 +78,7 @@ public function getTag($tagName) { return null; } - return new Puc_v4p3_Vcs_Reference(array( + return new Puc_v4p4_Vcs_Reference(array( 'name' => $tag->name, 'version' => ltrim($tag->name, 'v'), 'updated' => $tag->target->date, @@ -89,7 +89,7 @@ public function getTag($tagName) { /** * Get the tag that looks like the highest version number. * - * @return Puc_v4p3_Vcs_Reference|null + * @return Puc_v4p4_Vcs_Reference|null */ public function getLatestTag() { $tags = $this->api('/refs/tags?sort=-target.date'); @@ -103,7 +103,7 @@ public function getLatestTag() { //Return the first result. if ( !empty($versionTags) ) { $tag = $versionTags[0]; - return new Puc_v4p3_Vcs_Reference(array( + return new Puc_v4p4_Vcs_Reference(array( 'name' => $tag->name, 'version' => ltrim($tag->name, 'v'), 'updated' => $tag->target->date, @@ -117,7 +117,7 @@ public function getLatestTag() { * Get the tag/ref specified by the "Stable tag" header in the readme.txt of a given branch. * * @param string $branch - * @return null|Puc_v4p3_Vcs_Reference + * @return null|Puc_v4p4_Vcs_Reference */ protected function getStableTag($branch) { $remoteReadme = $this->getRemoteReadme($branch); @@ -233,7 +233,7 @@ public function setAuthentication($credentials) { parent::setAuthentication($credentials); if ( !empty($credentials) && !empty($credentials['consumer_key']) ) { - $this->oauth = new Puc_v4p3_OAuthSignature( + $this->oauth = new Puc_v4p4_OAuthSignature( $credentials['consumer_key'], $credentials['consumer_secret'] ); diff --git a/Puc/v4p3/Vcs/GitHubApi.php b/Puc/v4p4/Vcs/GitHubApi.php similarity index 96% rename from Puc/v4p3/Vcs/GitHubApi.php rename to Puc/v4p4/Vcs/GitHubApi.php index 81883a78..e3f1e57d 100644 --- a/Puc/v4p3/Vcs/GitHubApi.php +++ b/Puc/v4p4/Vcs/GitHubApi.php @@ -1,8 +1,8 @@ api('/repos/:user/:repo/releases/latest'); @@ -60,7 +60,7 @@ public function getLatestRelease() { return null; } - $reference = new Puc_v4p3_Vcs_Reference(array( + $reference = new Puc_v4p4_Vcs_Reference(array( 'name' => $release->tag_name, 'version' => ltrim($release->tag_name, 'v'), //Remove the "v" prefix from "v1.2.3". 'downloadUrl' => $this->signDownloadUrl($release->zipball_url), @@ -103,7 +103,7 @@ public function getLatestRelease() { /** * Get the tag that looks like the highest version number. * - * @return Puc_v4p3_Vcs_Reference|null + * @return Puc_v4p4_Vcs_Reference|null */ public function getLatestTag() { $tags = $this->api('/repos/:user/:repo/tags'); @@ -118,7 +118,7 @@ public function getLatestTag() { } $tag = $versionTags[0]; - return new Puc_v4p3_Vcs_Reference(array( + return new Puc_v4p4_Vcs_Reference(array( 'name' => $tag->name, 'version' => ltrim($tag->name, 'v'), 'downloadUrl' => $this->signDownloadUrl($tag->zipball_url), @@ -130,7 +130,7 @@ public function getLatestTag() { * Get a branch by name. * * @param string $branchName - * @return null|Puc_v4p3_Vcs_Reference + * @return null|Puc_v4p4_Vcs_Reference */ public function getBranch($branchName) { $branch = $this->api('/repos/:user/:repo/branches/' . $branchName); @@ -138,7 +138,7 @@ public function getBranch($branchName) { return null; } - $reference = new Puc_v4p3_Vcs_Reference(array( + $reference = new Puc_v4p4_Vcs_Reference(array( 'name' => $branch->name, 'downloadUrl' => $this->buildArchiveDownloadUrl($branch->name), 'apiResponse' => $branch, @@ -290,7 +290,7 @@ public function buildArchiveDownloadUrl($ref = 'master') { * Get a specific tag. * * @param string $tagName - * @return Puc_v4p3_Vcs_Reference|null + * @return Puc_v4p4_Vcs_Reference|null */ public function getTag($tagName) { //The current GitHub update checker doesn't use getTag, so I didn't bother to implement it. @@ -306,7 +306,7 @@ public function setAuthentication($credentials) { * Figure out which reference (i.e tag or branch) contains the latest version. * * @param string $configBranch Start looking in this branch. - * @return null|Puc_v4p3_Vcs_Reference + * @return null|Puc_v4p4_Vcs_Reference */ public function chooseReference($configBranch) { $updateSource = null; diff --git a/Puc/v4p3/Vcs/GitLabApi.php b/Puc/v4p4/Vcs/GitLabApi.php similarity index 94% rename from Puc/v4p3/Vcs/GitLabApi.php rename to Puc/v4p4/Vcs/GitLabApi.php index a516e231..574c309c 100644 --- a/Puc/v4p3/Vcs/GitLabApi.php +++ b/Puc/v4p4/Vcs/GitLabApi.php @@ -1,8 +1,8 @@ getLatestTag(); @@ -66,7 +66,7 @@ public function getLatestRelease() { /** * Get the tag that looks like the highest version number. * - * @return Puc_v4p3_Vcs_Reference|null + * @return Puc_v4p4_Vcs_Reference|null */ public function getLatestTag() { $tags = $this->api('/:user/:repo/repository/tags'); @@ -80,7 +80,7 @@ public function getLatestTag() { } $tag = $versionTags[0]; - return new Puc_v4p3_Vcs_Reference(array( + return new Puc_v4p4_Vcs_Reference(array( 'name' => $tag->name, 'version' => ltrim($tag->name, 'v'), 'downloadUrl' => $this->buildArchiveDownloadUrl($tag->name), @@ -92,7 +92,7 @@ public function getLatestTag() { * Get a branch by name. * * @param string $branchName - * @return null|Puc_v4p3_Vcs_Reference + * @return null|Puc_v4p4_Vcs_Reference */ public function getBranch($branchName) { $branch = $this->api('/:user/:repo/repository/branches/' . $branchName); @@ -100,7 +100,7 @@ public function getBranch($branchName) { return null; } - $reference = new Puc_v4p3_Vcs_Reference(array( + $reference = new Puc_v4p4_Vcs_Reference(array( 'name' => $branch->name, 'downloadUrl' => $this->buildArchiveDownloadUrl($branch->name), 'apiResponse' => $branch, @@ -238,7 +238,7 @@ public function buildArchiveDownloadUrl($ref = 'master') { * Get a specific tag. * * @param string $tagName - * @return Puc_v4p3_Vcs_Reference|null + * @return Puc_v4p4_Vcs_Reference|null */ public function getTag($tagName) { throw new LogicException('The ' . __METHOD__ . ' method is not implemented and should not be used.'); @@ -248,7 +248,7 @@ public function getTag($tagName) { * Figure out which reference (i.e tag or branch) contains the latest version. * * @param string $configBranch Start looking in this branch. - * @return null|Puc_v4p3_Vcs_Reference + * @return null|Puc_v4p4_Vcs_Reference */ public function chooseReference($configBranch) { $updateSource = null; diff --git a/Puc/v4p3/Vcs/PluginUpdateChecker.php b/Puc/v4p4/Vcs/PluginUpdateChecker.php similarity index 93% rename from Puc/v4p3/Vcs/PluginUpdateChecker.php rename to Puc/v4p4/Vcs/PluginUpdateChecker.php index 7aa76016..3b96e814 100644 --- a/Puc/v4p3/Vcs/PluginUpdateChecker.php +++ b/Puc/v4p4/Vcs/PluginUpdateChecker.php @@ -1,21 +1,21 @@ api; $api->setLocalDirectory($this->getAbsoluteDirectoryPath()); - $info = new Puc_v4p3_Plugin_Info(); + $info = new Puc_v4p4_Plugin_Info(); $info->filename = $this->pluginFile; $info->slug = $this->slug; @@ -128,7 +128,7 @@ protected function readmeTxtExistsLocally() { * Copy plugin metadata from a file header to a Plugin Info object. * * @param array $fileHeader - * @param Puc_v4p3_Plugin_Info $pluginInfo + * @param Puc_v4p4_Plugin_Info $pluginInfo */ protected function setInfoFromHeader($fileHeader, $pluginInfo) { $headerToPropertyMap = array( @@ -159,7 +159,7 @@ protected function setInfoFromHeader($fileHeader, $pluginInfo) { * Copy plugin metadata from the remote readme.txt file. * * @param string $ref GitHub tag or branch where to look for the readme. - * @param Puc_v4p3_Plugin_Info $pluginInfo + * @param Puc_v4p4_Plugin_Info $pluginInfo */ protected function setInfoFromRemoteReadme($ref, $pluginInfo) { $readme = $this->api->getRemoteReadme($ref); diff --git a/Puc/v4p3/Vcs/Reference.php b/Puc/v4p4/Vcs/Reference.php similarity index 92% rename from Puc/v4p3/Vcs/Reference.php rename to Puc/v4p4/Vcs/Reference.php index 6a15f6ca..8a708770 100644 --- a/Puc/v4p3/Vcs/Reference.php +++ b/Puc/v4p4/Vcs/Reference.php @@ -1,5 +1,5 @@ api; $api->setLocalDirectory($this->getAbsoluteDirectoryPath()); - $update = new Puc_v4p3_Theme_Update(); + $update = new Puc_v4p4_Theme_Update(); $update->slug = $this->slug; //Figure out which reference (tag or branch) we'll use to get the latest version of the theme. @@ -60,13 +60,13 @@ public function requestUpdate() { //Get headers from the main stylesheet in this branch/tag. Its "Version" header and other metadata //are what the WordPress install will actually see after upgrading, so they take precedence over releases/tags. $remoteHeader = $this->getFileHeader($api->getRemoteFile('style.css', $ref)); - $update->version = Puc_v4p3_Utils::findNotEmpty(array( + $update->version = Puc_v4p4_Utils::findNotEmpty(array( $remoteHeader['Version'], - Puc_v4p3_Utils::get($updateSource, 'version'), + Puc_v4p4_Utils::get($updateSource, 'version'), )); //The details URL defaults to the Theme URI header or the repository URL. - $update->details_url = Puc_v4p3_Utils::findNotEmpty(array( + $update->details_url = Puc_v4p4_Utils::findNotEmpty(array( $remoteHeader['ThemeURI'], $this->theme->get('ThemeURI'), $this->metadataUrl, diff --git a/README.md b/README.md index 06a06da6..212a99cd 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ Getting Started ```php require 'path/to/plugin-update-checker/plugin-update-checker.php'; - $myUpdateChecker = Puc_v4p3_Factory::buildUpdateChecker( + $myUpdateChecker = Puc_v4_Factory::buildUpdateChecker( 'http://example.com/path/to/details.json', __FILE__, 'unique-plugin-or-theme-slug' @@ -93,7 +93,7 @@ By default, the library will check the specified URL for changes every 12 hours. ```php require 'plugin-update-checker/plugin-update-checker.php'; - $myUpdateChecker = Puc_v4p3_Factory::buildUpdateChecker( + $myUpdateChecker = Puc_v4_Factory::buildUpdateChecker( 'https://github.com/user-name/repo-name/', __FILE__, 'unique-plugin-or-theme-slug' @@ -167,7 +167,7 @@ The library will pull update details from the following parts of a release/tag/b ```php require 'plugin-update-checker/plugin-update-checker.php'; - $myUpdateChecker = Puc_v4p3_Factory::buildUpdateChecker( + $myUpdateChecker = Puc_v4_Factory::buildUpdateChecker( 'https://bitbucket.org/user-name/repo-name', __FILE__, 'unique-plugin-or-theme-slug' @@ -223,15 +223,15 @@ BitBucket doesn't have an equivalent to GitHub's releases, so the process is sli ```php require 'plugin-update-checker/plugin-update-checker.php'; - $myUpdateChecker = Puc_v4p3_Factory::buildUpdateChecker( + $myUpdateChecker = Puc_v4_Factory::buildUpdateChecker( 'https://gitlab.com/user-name/repo-name/', __FILE__, 'unique-plugin-or-theme-slug' ); //Note: Self-hosted instances of GitLab must be initialized like this: - $myUpdateChecker = new Puc_v4p3_Vcs_PluginUpdateChecker( - new Puc_v4p3_Vcs_GitLabApi('https://myserver.com/user-name/repo-name/'), + $myUpdateChecker = new Puc_v4_Vcs_PluginUpdateChecker( + new Puc_v4p4_Vcs_GitLabApi('https://myserver.com/user-name/repo-name/'), __FILE__, 'unique-plugin-or-theme-slug' ); diff --git a/plugin-update-checker.php b/plugin-update-checker.php index 9adb4ef4..a0fef190 100644 --- a/plugin-update-checker.php +++ b/plugin-update-checker.php @@ -1,24 +1,24 @@