WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#35443 closed enhancement (duplicate)

Allow selective plugins to load for wp-activate.php

Reported by: pbearne Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.6
Component: Login and Registration Keywords: has-patch
Focuses: multisite Cc:
PR Number:

Description

while installing s2member on multi-site you need to edit load.php to allow all plugins to be loaded

So this patch adds a filter to allow you select a set of plugins that should be loaded when loading wp-activate.php to allow plugins to modify the activation process

Attachments (4)

load.php.patch (1017 bytes) - added by pbearne 4 years ago.
patch
s2member.PNG (113.3 KB) - added by pbearne 4 years ago.
screenshot of s2member patch instructions
load.php.2.patch (1.1 KB) - added by pbearne 4 years ago.
fixed patch
load.php.3.patch (1.0 KB) - added by pbearne 4 years ago.
lets fix the spelling and formating

Download all attachments as: .zip

Change History (12)

@pbearne
4 years ago

patch

#1 follow-up: @ericlewis
4 years ago

Hi @pbearne, thanks for opening this ticket.

Active plugins are retrieved via a site option. Thereby, the list of active plugins could be modified with the
option_active_plugins filter.

We should get in contact with the s2member authors and make them aware of these tickets and get them involved :) Happy to consider changes where core can do better by plugins, but some of these changes should happen downstream (in the plugin).

#3 in reply to: ↑ 1 @pbearne
4 years ago

Replying to ericlewis:

Hi @pbearne, thanks for opening this ticket.

Active plugins are retrieved via a site option. Thereby, the list of active plugins could be modified with the
option_active_plugins filter.

We should get in contact with the s2member authors and make them aware of these tickets and get them involved :) Happy to consider changes where core can do better by plugins, but some of these changes should happen downstream (in the plugin).

Already talking to s2members team (or trying to)

the problem is that on line 593 an empty array to returned

the patch that s2members is install is this

<?php
// Modified for full plugin compatiblity.
    //if ( empty( $active_plugins ) || wp_installing() )
    if ( empty( $active_plugins ) || ( wp_installing() && !preg_match("/\/wp-activate\.php/", $_SERVER["REQUEST_URI"]) ) )
    return $plugins;

I added the filter so that by default we didn't load any plugins but rather had to select them as felt that is was better to load only what is need while installing / activating a site

Thoughts?

Paul

@pbearne
4 years ago

screenshot of s2member patch instructions

#4 @pbearne
4 years ago

  • Keywords has-patch dev-feedback multisite added

@pbearne
4 years ago

fixed patch

@pbearne
4 years ago

lets fix the spelling and formating

#5 follow-up: @jeremyfelt
4 years ago

  • Focuses multisite added
  • Keywords reporter-feedback added; dev-feedback multisite removed

Is this a duplicate of #23197? If we modify things in a way confident enough to allow selective plugins, we may be able to load all plugins instead.

#6 @pbearne
4 years ago

loading all plugins would a better fix

#7 in reply to: ↑ 5 @ericlewis
4 years ago

Replying to jeremyfelt:

Is this a duplicate of #23197?

I think we can consider it a duplicate.

#8 @jeremyfelt
4 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #23197.

Yeah, if we can find the right way to enable plugins for wp-activate.php, this ticket should fall into place.

Note: See TracTickets for help on using tickets.