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>
This commit is contained in:
2026-07-16 12:51:13 +01:00
parent 5de5b3ddb7
commit 83fe110dac
121 changed files with 9608 additions and 6 deletions

View File

@@ -1,15 +1,15 @@
<?php
/**
* Plugin Name: ATT Consent
* Plugin URI: https://github.com/att-consent/att-consent
* Plugin URI: https://git.h12e.com/steve/att-consent
* Description: Google Consent Mode v2 cookie consent with session attribution preservation, custom script management, and full gtag.js/GTM support.
* Version: 1.3.4
* Requires at least: 6.0
* Requires PHP: 7.4
* Author: ATT Consent
* Author URI: https://github.com/att-consent
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Author URI: https://git.h12e.com/steve/att-consent
* License: Proprietary
* License URI: https://git.h12e.com/steve/att-consent/raw/branch/main/LICENSE
* Text Domain: att-consent
* Domain Path: /languages
*/
@@ -29,3 +29,16 @@ register_activation_hook( __FILE__, array( 'ATT_Consent', 'activate' ) );
register_deactivation_hook( __FILE__, array( 'ATT_Consent', 'deactivate' ) );
ATT_Consent::get_instance();
// Self-hosted updates from Gitea. Metadata JSON lives on the repo's main branch;
// PUC polls it twice a day and surfaces new versions via WP's normal update flow.
$att_cc_puc = ATT_CC_PLUGIN_DIR . 'vendor/plugin-update-checker/plugin-update-checker.php';
if ( file_exists( $att_cc_puc ) ) {
require_once $att_cc_puc;
\YahnisElsts\PluginUpdateChecker\v5\PucFactory::buildUpdateChecker(
'https://git.h12e.com/steve/att-consent/raw/branch/main/updates.json',
__FILE__,
'att-consent'
);
}
unset( $att_cc_puc );