WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 2 years ago

#15906 new defect (bug)

validate_plugin needs all_plugins filter

Reported by: wpmuguru Owned by:
Priority: normal Milestone: Future Release
Component: Plugins Version:
Severity: normal Keywords: has-patch
Cc:

Description

If a plugin adds plugins to the plugin list in the plugin admin screens using the all_plugins filter, the added plugins will not validate. If the all_plugins filter is added to the validate function, then the plugin validates and activates fine.

Attachments (1)

15906.diff (615 bytes) - added by wpmuguru 2 years ago.

Download all attachments as: .zip

Change History (8)

wpmuguru2 years ago

comment:1 SergeyBiryukov2 years ago

get_plugins() function is used in several more places (e.g. in Plugin Editor). Shouldn't we use all_plugins filter in get_plugins() itself?

comment:2 wpmuguru2 years ago

If it was added to get_plugins, then both the $plugin_folder parameter & context (ex. plugin_editor) should be provided to the filter. So, I'm not sure that moving the filter there would provide any benefit.

comment:3 follow-up: nacin2 years ago

We killed off the all_plugins filters in 3.0, I believe.

comment:4 in reply to: ↑ 3 wpmuguru2 years ago

Replying to nacin:

We killed off the all_plugins filters in 3.0, I believe.

It's in https://core.trac.wordpress.org/browser/trunk/wp-admin/includes/class-wp-plugins-list-table.php#L47

as of R17228.

comment:5 nacin2 years ago

I was thinking of active_plugins: [12947].

comment:6 wpmuguru2 years ago

I'm good with punting this one to 3.2.

comment:7 dd322 years ago

  • Milestone changed from Awaiting Review to Future Release

*Punt*

Note: See TracTickets for help on using tickets.