Fragen\GitHub_Updater\Theme::pre_set_site_transient_update_themes PHP Метод

pre_set_site_transient_update_themes() публичный Метод

Finds newest tag and compares to current tag.
public pre_set_site_transient_update_themes ( array $transient ) : array | object
$transient array
Результат array | object
    public function pre_set_site_transient_update_themes($transient)
    {
        foreach ((array) $this->config as $theme) {
            if ($this->can_update($theme)) {
                $response = array('theme' => $theme->repo, 'new_version' => $theme->remote_version, 'url' => $theme->uri, 'package' => $theme->download_link, 'branch' => $theme->branch, 'branches' => array_keys($theme->branches));
                /*
                 * Skip on branch switching or rollback.
                 */
                if ($this->tag && (isset($_GET['theme']) && $theme->repo === $_GET['theme'])) {
                    continue;
                }
                $transient->response[$theme->repo] = $response;
            }
        }
        return $transient;
    }