Skip to content
Snippets Groups Projects
Commit f81823b4 authored by Grzegorz Rola's avatar Grzegorz Rola
Browse files

bugfix(text domain): loading in WP 6.7

parent 90c9f916
No related branches found
No related tags found
1 merge request!7bugfix(text domain): loading in WP 6.7
Pipeline #438706 passed with stages
in 35 seconds
## [1.2.1] - 2024-11-09
### Fixed
- WordPress 6.7 compatibility: loading text domain
## [1.2.0] - 2024-03-20 ## [1.2.0] - 2024-03-20
### Changed ### Changed
- Usage tracker is initialized by the library after all plugin's hookables are registered. - Usage tracker is initialized by the library after all plugin's hookables are registered.
......
...@@ -153,8 +153,13 @@ final class PluginBootstrap { ...@@ -153,8 +153,13 @@ final class PluginBootstrap {
if ( method_exists( $plugin_info, 'get_language_dir' ) ) { if ( method_exists( $plugin_info, 'get_language_dir' ) ) {
$lang_dir = $plugin_info->get_language_dir(); $lang_dir = $plugin_info->get_language_dir();
} }
\load_plugin_textdomain( $plugin_info->get_text_domain(), \false, add_action( 'init', function () use ( $plugin_info, $lang_dir ) {
basename( $plugin_info->get_plugin_dir() ) . "/$lang_dir/" ); \load_plugin_textdomain(
$plugin_info->get_text_domain(),
'',
basename( $plugin_info->get_plugin_dir() ) . "/$lang_dir/"
);
});
} }
/** /**
...@@ -195,4 +200,4 @@ final class PluginBootstrap { ...@@ -195,4 +200,4 @@ final class PluginBootstrap {
return $plugin_info; return $plugin_info;
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment