bedrock-autoloader
bedrock-autoloader copied to clipboard
countPlugins returning wrong number
Description
Hello,
The method \Roots\Bedrock\Autoloader::countPlugins is returning a wrong number of mu-plugins if the mu-plugin isn't one. Because the way of WordPress is counting mu-plugin is not the same as yours, the number can be wrong in the case of the folder on mu-plugins doesn't contains a php file with WordPress headers.
Steps to reproduce
- Add humanmade/mercator dependency
- Follow the installation process https://github.com/humanmade/Mercator#installation
- Load WordPres 2 times
- The updateCache method is called on every page
Expected behavior: That only the real mu-plugins loaded by WordPress are effectively counted with get_plugins function.
Actual behavior: The glob only counts the folders.
Reproduces how often: 100%
Versions
1.0.1, but the code haven't changed since.
Maybe strip away the mu-plugins without header to have the right count ?