#27110 closed enhancement (maybelater)
Allow filtering the plugin list in the admin
Reported by: | rmccue | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | |
Component: | Plugins | Keywords: | has-patch |
Focuses: | administration | Cc: |
Description
At the moment, as decided in many tickets (such as #23403), mu-plugins can't be loaded from subdirectories. This isn't a big issue, but it means that the must-use plugins screen can seem a little bare.
I'd like to add a filter to allow adding extra plugins to the screen. Patch attached.
It's almost possible to get this working as-is, but pagination will always be broken, as WP_Plugins_List_Table
calls wp_redirect
if the pagination doesn't seem right.
(This could also be a filter in get_mu_plugins
, but it has limited use for other purposes.)
Attachments (1)
Change History (4)
#1
@
11 years ago
I don't want to derail Ryan's emphasis for creating this ticket, but a non-core use case I can think of straight away is for TGM Plugin Activation.
This is a set of classes that allow a theme to include a plugin (or a reference to a plugin on the .org repo) that is considered required or recommended for the theme i.e. a plugin that registers a CPT, instead of including it within the theme files. Theme Forest make a direct reference to it in their Theme Submission Requirements, so there are more than a handful of folks using it.
TGMPA currently builds it's own page that shows the referenced plugins. Being able to filter these plugin references in to the standard plugins page, with some indicator that the plugins are not yet installed (which would be a new status to consider) would potentially make the user flow for those with themes using TGMPA to be considerably smoother.
(Thomas Griffin is in the process of rewriting TGMPA into a new set of classes that accomplish the same thing with new features.)
#2
@
9 years ago
- Milestone Awaiting Review deleted
- Resolution set to maybelater
- Status changed from new to closed
No further interest in pursuing this in a year and a half. Closing as maybelater.
#3
@
7 years ago
Could we please revisit this? It seems very weird that we have a hook to add additional links to the views
line above plugin list, but that there is no clean way to make the list table to display anything but he default plugin list once you click that link.
If that was a conscious decision, to not allow plugin developers to mess with that screen, I can understand that, though it is a bit futile, as there are ways to get around that (not nice ways, but ways nonetheless). You can hook into a different hook and modify $plugins
, $totals
and $status
WP globals to achieve that, as demonstrated here: https://github.com/ideag/TinyLibraries/blob/master/tinylibraries.php#L104-L121
If this was just overlooked, I'd be happy to provide a patch for this.
Add filter to WP_Plugins_List_Table