AutoUpdates final readonly class
Minn\Ops\AutoUpdates · public/minn/src/Minn/Ops/AutoUpdates.php · 29 lines
Whether per-item auto-updates apply to plugins or themes, as the reference decides it (contracts/rest/minn-admin-v1.md "Auto-updates"): never when file mods are off (DISALLOW_FILE_MODS through file_mod_allowed, context automatic_updater), never when the updater is disabled (AUTOMATIC_UPDATER_DISABLED through automatic_updater_disabled, which a plugin may turn back), and then the type's own filter has the last word. Only plugins and themes can be on.
Constants and properties
| private | readonly Closure $filter | Promoted from the constructor. |
Public
| new | __construct(Closure $filter)# |
| |||
| static | forSite(): self# | The gate as the site's plugins see it: through their filters once the runtime's hooks exist, as configured otherwise. | |||
| method | enabledFor(string $type): bool# | Whether per-item auto-updates apply to a type ("plugin" or "theme"; anything else is never on). |
Internals 1
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | updaterOff(): bool# | Whether the automatic updater is off for the whole site: file mods refused, or the updater disabled. |
Nothing matches.