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
Branches
Tags
1 merge request!7bugfix(text domain): loading in WP 6.7
Pipeline #438706 passed
This commit is part of merge request !7. Comments created here will be created in the context of that merge request.
## [1.2.1] - 2024-11-09
### Fixed
- WordPress 6.7 compatibility: loading text domain
## [1.2.0] - 2024-03-20
### Changed
- Usage tracker is initialized by the library after all plugin's hookables are registered.
......
......@@ -153,8 +153,13 @@ final class PluginBootstrap {
if ( method_exists( $plugin_info, 'get_language_dir' ) ) {
$lang_dir = $plugin_info->get_language_dir();
}
\load_plugin_textdomain( $plugin_info->get_text_domain(), \false,
basename( $plugin_info->get_plugin_dir() ) . "/$lang_dir/" );
add_action( 'init', function () use ( $plugin_info, $lang_dir ) {
\load_plugin_textdomain(
$plugin_info->get_text_domain(),
'',
basename( $plugin_info->get_plugin_dir() ) . "/$lang_dir/"
);
});
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment