Skip to content

Commit

Permalink
Use variable instead of constant for module path
Browse files Browse the repository at this point in the history
  • Loading branch information
eliot-akira committed Oct 24, 2024
1 parent bcb80e2 commit 9bc6b4c
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@

define('TANGIBLE_FIELDS_IS_PLUGIN', true);

if (!defined('TANGIBLE_VENDOR_PATH')) {
define('TANGIBLE_VENDOR_PATH', is_dir(
($path = __DIR__ . '/vendor/tangible')
) ? $path : __DIR__ . '/..');
}
$module_path = is_dir(
($path = __DIR__ . '/vendor/tangible')
) ? $path : __DIR__ . '/..';

require_once TANGIBLE_VENDOR_PATH . '/framework/index.php';
require_once TANGIBLE_VENDOR_PATH . '/updater/index.php';
require_once $module_path . '/framework/index.php';
require_once $module_path . '/updater/index.php';
require_once __DIR__ . '/index.php';

add_action('plugins_loaded', function() {
Expand Down

0 comments on commit 9bc6b4c

Please sign in to comment.