src/UpdateWatcher.php
public function filterPreSetSiteTransientUpdatePlugins($transient)
    {
        $this->updatePluginData();
        $this->updateGithubData();

        if (version_compare($this->githubLatestRelease['tag_name'], $this->pluginData['Version']) === 1) {
            $update = new \stdClass();
            $update->slug = $this->pluginSlug;
            $update->new_version = $this->githubLatestRelease['tag_name'];
            $update->url = $this->pluginData['PluginURI'];
            $update->package = $this->githubLatestRelease['zipball_url'];
            
            $transient->response[$this->pluginBaseName] = $update;
        }
        
        return $transient;
    }
public function filterPreSetSiteTransientUpdatePlugins($transient)
    {
        $this->updatePluginData();
        $this->updateGithubData();

        if (version_compare($this->githubLatestRelease['tag_name'], $this->pluginData['Version']) === 1) {
            $update = new \stdClass();
            $update->slug = $this->pluginSlug;
            $update->new_version = $this->githubLatestRelease['tag_name'];
            $update->url = $this->pluginData['PluginURI'];
            $update->package = $this->githubLatestRelease['zipball_url'];
            
            $transient->response[$this->pluginBaseName] = $update;
        }
        
        return $transient;
    }
public function filterPreSetSiteTransientUpdatePlugins ( $ transient ) { $ this -> updatePluginData ( ) ; $ this -> updateGithubData ( ) ; if ( version_compare ( $ this -> githubLatestRelease [ 'tag_name' ] , $ this -> pluginData [ 'Version' ] ) === 1 ) { $ update = new \ stdClass ( ) ; $ update -> slug = $ this -> pluginSlug ; $ update -> new_version = $ this -> githubLatestRelease [ 'tag_name' ] ; $ update -> url = $ this -> pluginData [ 'PluginURI' ] ; $ update -> package = $ this -> githubLatestRelease [ 'zipball_url' ] ; $ transient -> response [ $ this -> pluginBaseName ] = $ update ; } return $ transient ; }
Add in plugin information in order to get updates
@param $transient object
@return object
Add in plugin information in order to get updates