Opened 19 years ago
Closed 19 years ago
#3909 closed defect (bug) (fixed)
Plugin handling Inconsistency as a consequence of ticket #3157
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 2.2 | Priority: | low |
| Severity: | normal | Version: | 2.1 |
| Component: | General | Keywords: | has-patch |
| Focuses: | Cc: |
Description
I saw in ticket #3157 that constant PLUGINDIR was introduced instead of "wp-content/plugins", well but the job is half done...
When modified in wp-config.php PLUGINDIR works well for the admin part : the plugins get detected in the admin and can be activated. But they are totally ineffective in the frontend because they don't get loaded.
I found in wp-settings.php (in the trunk) at line 200
if ( get_option('active_plugins') ) {
$current_plugins = get_option('active_plugins');
if ( is_array($current_plugins) ) {
foreach ($current_plugins as $plugin) {
if ('' != $plugin && file_exists(ABSPATH . 'wp-content/plugins/' . $plugin))
include_once(ABSPATH . 'wp-content/plugins/' . $plugin);
}
}
}
but it should be :
if ( get_option('active_plugins') ) {
$current_plugins = get_option('active_plugins');
if ( is_array($current_plugins) ) {
foreach ($current_plugins as $plugin) {
if ('' != $plugin && file_exists(ABSPATH . PLUGINDIR . $plugin))
include_once(ABSPATH . PLUGINDIR . $plugin);
}
}
}
as PLUGINDIR is defined around line 95.
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
You'd need a slash between
PLUGINDIRand$plugin