Closed remyvv closed 2 years ago
LGTM.
Please be aware that the autoload file is loaded from a MU plugin. So if a MU plugin requires autoload, it will rely on the the "loader" MU plugin to be loaded first.
Which should be the case because of how the file is named (__loader.php
) but we have no warranties.
In fact, on VIP, custom MU plugins are in a custom folder (client-mu-plugins
) which is loaded by a "real" MU plugin by VIP.
If that VIP MU plugin decides to load MU plugin using a different order than alphabetic... any autoload-powered MU plugin will break.
Ideally MU plugins should be self-contained, and do not rely on autoload.
This PR extends the autoloader replacement regex to include replacing paths to the
client-mu-plugins
, to support the autoloading of files within packages of type "wordpress-muplugin".Fixes #8