wp-activate, without explanation, does not load site plugins
|Reported by:||radiok||Owned by:|
I am the developer of a Wordpress plugin that modifies the Registration process. I am porting my code to Wordpress Multisite and am running into an odd obstacle. During the signup process, I store meta data in the signups table. I intend to restore that data after the user has activated their account using hooks located in wp-activate.php. I learned the hard way that wp-activate is altering the load sequence with the following flag.
define( 'WP_INSTALLING', true );
The preceding comment says "Define ABSPATH as this file's directory", which to me does not entirely jive up. Regardless, with this flag in place, when Wordpress would normally determine what plugins to load in wp_get_active_and_valid_plugins, instead it returns an empty array. I do not believe this is the desired behavior.
My solution has to been to create a small "must-use" plugin simply for my activation related code. This however, is not a desirable solution since must-use plugins must be manually installed. I cannot determine much of an alternate solution; I cannot modify that flag in a plugin at any level since my plugin would never be loaded for it to get a chance to modify the flag. It is a bit of a chicken and the egg problem.
Change History (13)
- Summary changed from wp-activate does not load plugins to wp-activate, without explanation, does not load site plugins
comment:3 johnbillion — 11 months ago
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
comment:5 johnbillion — 3 months ago
- Resolution duplicate deleted
- Status changed from closed to reopened
comment:7 follow-up: ↓ 10 johnbillion — 3 months ago
- Keywords has-patch dev-feedback added; needs-patch removed
- Milestone set to Awaiting Review
- Severity changed from trivial to normal
- Version set to 3.0
comment:9 johnbillion — 2 months ago
- Keywords dev-feedback removed
- Milestone changed from 3.7 to 3.8