Inventory final readonly class
Minn\Content\Inventory · public/minn/src/Minn/Content/Inventory.php · 253 lines
Plugins, themes, must-use plugins, and drop-ins as they sit on disk. The shapes match `wp plugin list` / `wp theme list` captured from the reference: name is the directory (or the drop-in filename), title and version come from the file headers, status from the options.
Constants and properties
| private | DROPINS = array ( 0 => 'advanced-cache.php', 1 => 'db.php', 2 => 'db-error.php', 3 => 'fatal-error-handler.php', 4 => 'install.php', 5 => 'maintenance.php', 6 => 'object-cache.php', 7 => 'php-error.php', 8 => 'sunrise.php', ) | Drop-in filenames at wp-content/ that hosting tools treat as WordPress drop-ins. |
| const | KNOWN_DROPINS = array ( 'advanced-cache.php' => array ( 0 => 'Advanced caching plugin.', 1 => 'WP_CACHE', ), 'db.php' => array ( 0 => 'Custom database class.', 1 => true, ), 'db-error.php' => array ( 0 => 'Custom database error message.', 1 => true, ), 'install.php' => array ( 0 => 'Custom installation script.', 1 => true, ), 'maintenance.php' => array ( 0 => 'Custom maintenance message.', 1 => true, ), 'object-cache.php' => array ( 0 => 'External object cache.', 1 => true, ), 'php-error.php' => array ( 0 => 'Custom PHP error message.', 1 => true, ), 'fatal-error-handler.php' => array ( 0 => 'Custom PHP fatal error handler.', 1 => true, ), ) | The drop-ins a single site recognises, in the reference's order: the file => its description and the constant that must be true for it to load (true when nothing gates it). |
| private | readonly string $contentDir | Promoted from the constructor. |
| private | readonly Minn\Content\Site $site | Promoted from the constructor. |
Public
| new | __construct(string $contentDir, Minn\Content\Site $site)# | |
| method | plugins(): array# | Regular plugins, then must-use, then drop-ins, each group sorted by name. @return list<array<string, mixed>> |
| method | mustUse(): array# | The mu-plugins folder's PHP files, each with its header. @return list<array<string, mixed>> |
| method | dropins(): array# | The drop-in files present in wp-content. @return list<array<string, mixed>> |
| method | themes(): array# | Every theme folder with its style.css header. @return list<array<string, mixed>> |
| method | pluginFiles(): array# | Every regular plugin's main file: relative "dir/file.php" (or "file.php" for a single-file plugin) to its absolute path. @return array<string, string> |
Internals 3
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
Nothing matches.