Make WordPress Core

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's profile 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)

#1 @johnbillion
6 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version 4.9.6 deleted

Duplicate of #23197.

Note: See TracTickets for help on using tickets.