Skip to content

Commit

Permalink
Only load plugins locally
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Thulin committed Sep 25, 2023
1 parent 1568f32 commit 8064305
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions source/php/Plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,11 @@ public function includePlugins() {
foreach ($this->plugins as $plugin) {

//Paths to try
$pluginPath = [
'common' => ABSPATH . "../vendor/" . $plugin,
'local' => MODULARITY_PATH . "vendor/" . $plugin
];
$pluginPath = MODULARITY_PATH . "vendor/" . $plugin;

//Include either one
if(file_exists($pluginPath['local'])) {
require_once $pluginPath['local'];
} elseif (file_exists($pluginPath['common'])) {
require_once $pluginPath['common'];
if(file_exists($pluginPath)) {
require_once $pluginPath;
}
}
}
Expand Down

0 comments on commit 8064305

Please sign in to comment.