Skip to content

Commit c47879d

Browse files
committed
fix: absolute path issue
1 parent 234d727 commit c47879d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

onedesign.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
// Define constants.
2121
define( 'ONEDESIGN_VERSION', '1.0.0' );
2222
define( 'ONEDESIGN_DIR_PATH', plugin_dir_path( __FILE__ ) );
23+
define( 'ONEDESIGN_RELATIVE_PATH', dirname( plugin_basename( __FILE__ ) ) );
2324
define( 'ONEDESIGN_DIR_URL', plugin_dir_url( __FILE__ ) );
2425
define( 'ONEDESIGN_BUILD_URI', trailingslashit( plugin_dir_url( __FILE__ ) ) . 'assets/build/' );
2526
define( 'ONEDESIGN_BUILD_PATH', trailingslashit( plugin_dir_path( __FILE__ ) ) . 'assets/build/' );
@@ -86,7 +87,7 @@ function onedesign_plugin_loader() {
8687
\OneDesign\Plugin::get_instance();
8788

8889
// load plugin text domain.
89-
load_plugin_textdomain( 'onedesign', false, ONEDESIGN_DIR_PATH . '/languages/' );
90+
load_plugin_textdomain( 'onedesign', false, ONEDESIGN_RELATIVE_PATH . '/languages/' );
9091
}
9192

9293
add_action( 'plugins_loaded', 'onedesign_plugin_loader' );

0 commit comments

Comments
 (0)