Clanbite Since 1.6.0
class Compat_MonitorUpdates to Clanbite itself come from wordpress.org (or an auto-update, or FTP) and the update server cannot gate them. This class is the safety net on the site: any plugin whose main file declares Requires Clanbite: <constraint> is checked against the Clanbite that is actually installed, and when it does not fit it is **deactivated** (silently, so none of its code runs) instead of being left to fatal the site. It also covers the add-ons' other declared needs: Requires Clanbite Add-ons, Requires PHP and Requires at least.
When the check runs: – right after Clanbite or any plugin is updated or installed (using the **new** version found on disk, before the next request loads old add-ons on a new core), – right after a plugin is activated, – on the first request after anything relevant changed (an FTP update, a manual downgrade).
What it does: deactivates the plugin, remembers why (clanbite_disabled_addons), shows a notice and a Site Health entry, warns before a Clanbite update that would turn add-ons off, and **re-enables** what it disabled as soon as the plugin is compatible again (for example after the add-on is updated). Opt out with the clanbite_addon_guard_enabled filter or the CLANBITE_DISABLE_ADDON_GUARD constant. Plugins without a Requires Clanbite header are not touched, except first-party add-ons (they use the Clanbite update server), which are assumed to be built for Clanbite 1.x.
class final
- Full name
Kernowdev\Clanbite\Updates\Compat_Monitor
Constants
| Name | Value | Description |
|---|---|---|
OPTION | 'clanbite_disabled_addons' |
Methods
after_activation()After a plugin was activated by hand (or by another plugin).after_upgrade()After any plugin was updated or installed.constraint_for()The Clanbite versions a plugin says it works with.core_update_warning()The warning.disabled()Plugins this site has switched off because they are incompatible.enabled()Whether the guard is switched on.evaluate()Judge plugins against a Clanbite version.extra_headers()Ask WordPress to read the compatibility headers into get_plugins() data.maybe_sweep()First request after something changed: run a sweep.notice()Notice listing what was switched off.plugin_row()One explanatory row.preview()What a Clanbite update would switch off.register_core_warning()Warn on Clanbite's own update row about add-ons that the new version would switch off.register_rows()Explain it under each switched-off plugin on the Plugins screen.register()Register hooks.site_health_test()Site Health result.site_health_tests()Site Health entry.sweep()Check every plugin, switch off what cannot run and switch back on what can again.
Defined in inc/updates/class-compat-monitor.php
Changelog
| Version | Description |
|---|---|
| 1.6.0 | Introduced. |