PluginRequirements final class
Minn\Runtime\PluginRequirements · public/minn/src/Minn/Runtime/PluginRequirements.php · 66 lines
Whether a plugin can be switched on here, as the reference's validate_plugin_requirements answers (probe plugin-activation): the plugin header's "Requires at least" against the WordPress version the site speaks, its "Requires PHP" against the running PHP, and every slug in its "Requires Plugins" installed and active (a readme.txt is not read). A refusal carries the reference's code, its HTML message word for word, and for missing plugins the slugs found inactive (slug => name) and not installed (slug => slug). The slugs are taken sorted (one that is not a lower-case slug is passed over), and named in that order.
Public
| static | check(string $plugin): ?Minn\Runtime\Refusal# | Null when the plugin may be activated, otherwise why not. |
Internals 2
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | dependencies(string $name, string $required): ?Minn\Runtime\Refusal# | The required plugins that are not installed and active, refused together. |
| private | installed(string $slug): ?string# | The installed plugin a slug names: the first file in its folder with a plugin header, else a single-file plugin of that name. |
Nothing matches.