Files
att-consent/vendor/plugin-update-checker/load-v5p7.php
Steve Hanlon 83fe110dac Self-hosted auto-updates from Gitea via PUC + proprietary licence
Vendors YahnisElsts/plugin-update-checker v5.7 under vendor/ and wires
it to poll updates.json on the repo main branch. WP surfaces new
versions via Dashboard → Updates on its normal twice-daily cadence.

PUC is vendored (not a submodule) so Gitea's archive/main.zip — the
download target — includes it.

Also relicenses from GPL-2.0-or-later to a proprietary licence granting
use only to authorised sites, with all other rights reserved. Plugin
URI + Author URI switched from the placeholder github.com URL to the
canonical Gitea repo.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-07-16 12:51:13 +01:00

35 lines
1.1 KiB
PHP

<?php
namespace YahnisElsts\PluginUpdateChecker\v5p7;
use YahnisElsts\PluginUpdateChecker\v5\PucFactory as MajorFactory;
use YahnisElsts\PluginUpdateChecker\v5p7\PucFactory as MinorFactory;
require __DIR__ . '/Puc/v5p7/Autoloader.php';
new Autoloader();
require __DIR__ . '/Puc/v5p7/PucFactory.php';
require __DIR__ . '/Puc/v5/PucFactory.php';
//Register classes defined in this version with the factory.
foreach (
array(
'Plugin\\UpdateChecker' => Plugin\UpdateChecker::class,
'Theme\\UpdateChecker' => Theme\UpdateChecker::class,
'Vcs\\PluginUpdateChecker' => Vcs\PluginUpdateChecker::class,
'Vcs\\ThemeUpdateChecker' => Vcs\ThemeUpdateChecker::class,
'GitHubApi' => Vcs\GitHubApi::class,
'BitBucketApi' => Vcs\BitBucketApi::class,
'GitLabApi' => Vcs\GitLabApi::class,
)
as $pucGeneralClass => $pucVersionedClass
) {
MajorFactory::addVersion($pucGeneralClass, $pucVersionedClass, '5.7');
//Also add it to the minor-version factory in case the major-version factory
//was already defined by another, older version of the update checker.
MinorFactory::addVersion($pucGeneralClass, $pucVersionedClass, '5.7');
}