Opened 6 years ago
Closed 6 years ago
#44208 closed defect (bug) (duplicate)
No plugins loaded when user loads wp-activate.php
Reported by: | conner_bw | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
When a user gets an activation email they are asked to click on a URL that looks something like:
https://site/wp-activate.php?key=16d1406f53bc783f
Expected: I can hook into actions and filters from in my plugin.
Actual: wp_get_active_and_valid_plugins() returns an empty array, no plugins are ever loaded.
Why? Because:
First line of wp-activate.php:
<?php define( 'WP_INSTALLING', true );
Code to load plugins in wp_get_active_and_valid_plugins()
if we remove the deprecated helper stuff:
<?php $plugins = array(); $active_plugins = (array) get_option( 'active_plugins', array() ); if ( empty( $active_plugins ) || wp_installing() ) return $plugins;
Help?
See:
[1] https://github.com/WordPress/WordPress/blob/master/wp-includes/load.php
[2] https://github.com/WordPress/WordPress/blob/master/wp-activate.php
Change History (1)
Note: See
TracTickets for help on using
tickets.
Duplicate of #23197.