Opened 8 years ago
Closed 8 years ago
#44208 closed defect (bug) (duplicate)
No plugins loaded when user loads wp-activate.php
| Reported by: | conner_bw | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Duplicate of #23197.