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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user