Opened 3 years ago
Last modified 2 years ago
#13218 reviewing defect (bug)
Allow to specify name of drop-in which is not a plugin
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | Administration | Version: | 3.0 |
| Severity: | normal | Keywords: | needs-patch |
| Cc: |
Description
As I mentioned in #11861, plugin DB Cache Reloaded have two files: one main plugin file, and another used as wp-content/db.php drop-in. I would like to provide name for the drop-in file, but now the only way is to use the Plugin Name: header. Unfortunately when I do this, drop-in file bundled with plugin appears on plugin list. Therefore I need new header, which could I use to specify drop-in name, without that unwanted side effect.
Change History (4)
- Milestone changed from 3.0 to 3.1
- Owner set to nacin
- Status changed from new to reviewing
This seems pretty legit to me, as drop-ins do not operate as normal plugins. They're really something else. This could be as simple as adding "Drop-in Name" as a header to look for with the known drop-in files. Such header would show up on the Drop-Ins page in Admin, but would be ignored by the other existing "plugins" functions.
However, for backwards compatibility we should also allow the drop-ins list to recognize "Plugin Header" of that is present instead.
Within Core we could create a new wrapper for get_file_data() -- call it get_drop-in_data() perhaps. It would look for both "Drop-in Name" and "Plugin Name", with "Drop-in Name" taking precedence if both are present.
Then drop-ins that are having issues with showing up as regular plugins could simply switch to the new header and all is well. Should be a relatively easy patch I would think.

Just create a subdicretory within your plugin bundle directory, and inside that subdirectory another one and place the dropin file there. AFAIK wordpress only checks the first two levels while scanning for files). That should solve your problem.
As this feature request is somehow very specific and an overall solution would need some thoughful design and implementation I suggest to close as wontfix.