WordPress.org

WordPress MU

Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#343 closed defect (wontfix)

Mu-plugins don't function if they're entirely contained within their own directory

Reported by: johnbillion Owned by: somebody
Milestone: Priority: normal
Severity: normal Version:
Component: component1 Keywords:
Cc: johnbillion

Description

First of all, apologies if this has been covered already but I can't find anything after searching MU Trac.

If a WPMU-compatible plugin is uploaded into the wp-content/mu-plugins directory and the main plugin file is contained within its own sub directory (eg. myplugin/myplugin.php), then the plugin will not be recognised nor auto-activated.

Background: complex plugins are contained within their own directory for better file organisation, and most (if not all) plugins in the new WordPress.org Plugins Directory are contained within their own directory in order to accomodate the readme.txt file.

It would be ideal if plugins which use such a structure are recognised when they're used as mu-plugins.

WPMU version 1.2.1.

Change History (5)

comment:1 JeremyVisser7 years ago

Yes, but then how does it tell the difference between a library file and the actual plugin? Without a plugin management GUI, it's not possible.

I propose WPMU having two plugin screens, a global one and a local one, rather than WPMU automatically executing everything in mu-plugins.

comment:2 donncha7 years ago

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

While it would be useful to search inside directories Jeremy makes very valid points. We don't need another plugins page however because one is already there as long as it's activated in the site admin options page.

You can still copy the WP plugin into the plugins directory and activate it when desired. The following code will do it. Just hook it into the signup procedure after the blog is created:

update_option( 'active_plugins', $plugins); // $plugins is an array of plugin names
include(ABSPATH . 'wp-content/plugins/' . $plugin_name );
do_action('activate_' . $plugin_name );

comment:3 JeremyVisser7 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:4 JeremyVisser7 years ago

  • Resolution set to wontfix
  • Status changed from reopened to closed

comment:5 omry6 years ago

Check this out, it should provide a suitable replacement for the functionality you need.

Note: See TracTickets for help on using tickets.