Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#15166 closed defect (bug) (fixed)

is_plugin_active() returns based on current site in Network Admin

Reported by: kawauso Owned by:
Priority: normal Milestone: 3.1
Component: Administration Version:
Severity: minor Keywords: has-patch
Cc: Kawauso

Description

is_plugin_active() uses the 'active_plugins' option, which is site-specific, as well as is_plugin_active_for_network().

Most obviously affects the Plugins section in Network Admin, which displays both the current site's plugins as well as those network activated as being active.

Attachments (3)

patch.patch (577 bytes) - added by kawauso 3 years ago.
Use is_network_admin() check before using 'active_plugins' option
15166.2.diff (631 bytes) - added by kawauso 3 years ago.
Spread code over multiple lines for readability
15166.diff (857 bytes) - added by nacin 3 years ago.

Download all attachments as: .zip

Change History (7)

kawauso3 years ago

Use is_network_admin() check before using 'active_plugins' option

  • Keywords has-patch added; is_plugin_active network plugins removed

kawauso3 years ago

Spread code over multiple lines for readability

We wouldn't put this logic into is_plugin_active. Where I would put the logic, already has the logic -- It looks like we've properly accounted for is_network_admin() in WP_Plugins_Table::display_rows(). I also can't reproduce this.

nacin3 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [15870]) Add some more network admin logic to the plugins list table. fixes #15166.

  • Milestone changed from Awaiting Review to 3.1
Note: See TracTickets for help on using tickets.