feat(wpmc S7): Plugin::register_update_checker wires PUC v5.6

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Vladimir Bryzgalov
2026-05-17 12:20:31 +05:00
parent 17ac243a1a
commit 25d50912f6
4 changed files with 180 additions and 0 deletions
+18
View File
@@ -58,6 +58,24 @@ final class Plugin
TitleFilter::register();
LinkFilter::register();
RestUrlFilter::register();
self::register_update_checker();
}
private static function register_update_checker(): void
{
$loader = WPMC_PLUGIN_DIR . 'includes/lib/plugin-update-checker/plugin-update-checker.php';
if (!\is_file($loader)) {
return;
}
require_once $loader;
if (!\class_exists('YahnisElsts\\PluginUpdateChecker\\v5\\PucFactory')) {
return;
}
\YahnisElsts\PluginUpdateChecker\v5\PucFactory::buildUpdateChecker(
'https://git.netranking.ru/bryzgalov/wp-multi-city/raw/branch/main/wp-plugin-info.json',
WPMC_PLUGIN_FILE,
'wp-multi-city'
);
}
private function dependencies_satisfied(): bool