Opened 3 years ago
Closed 3 years ago
#11750 closed enhancement (fixed)
fix_active_plugins() should not be needed
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.0 |
| Component: | Optimization | Version: | 3.0 |
| Severity: | normal | Keywords: | multisite has-patch dev-feedback 2nd-opinion |
| Cc: |
Description
Where we call get_option(active_plugins), we should always include a default value of array(). The fix_active_plugins() function should never be needed.
Attachments (3)
Change History (11)
- Keywords has-patch added; reviewing removed
A first patch that streamlines the reading of the active_plugins value as well as streamlining the loading of both, standard and wpmu plugins based on the standard plugins loading validations. introducing a new function called valid_plugins() which reduces plugin inclusion into a simple foreach clause.
will create a second patch w/o those improvements.
Second patch taking care of propper default values. Will write the next follow up for fix_active_plugins() removal.
- Keywords dev-feedback 2nd-opinion added
Third patch as the straight fix to the ticket. Could be merged with first patch to improve the codebase if wanted.
Additional info: I tested against loding WPMU and standard plugins. Worked properly (first patch).
I like the valid_plugins() idea in the first patch (11750-full-incl-valid-plugins-function.patch)

Right, that logic is part of validate_active_plugins() in existing core already (plugin.php). While doing some sniffs over the codebase for a first patch I realize that the newly introduced approach ticks edge-cases here and there.