Better plugin main-file support for makepot.php tool
|Reported by:||Otto42||Owned by:||nacin|
The makepot.php tool, when used for plugins, contains the assumption that the "main file" of a plugin will be named plugin-slug.php, when searching for plugin headers to include in the POT file for translation. This is not necessarily the case all the time, and WordPress itself does a directory search in get_plugins to find the "main file" of the plugin.
The makepot.php file should do a similar search instead of making this assumption. This allows it to find plugin headers in files that are named differently than their slugs.
Patch attached. Most of the directory searching code is ripped from the core's own code, but I removed the subdirectory searching since I think that might be a step too far. That could be added back though, if that is desirable.