Fix issue #15: Load textdomain at init action to prevent 'too early' warnings in WP 6.7+
This commit is contained in:
@ -231,9 +231,11 @@ final class WP_Ultimo {
|
|||||||
*/
|
*/
|
||||||
public function setup_textdomain(): void {
|
public function setup_textdomain(): void {
|
||||||
/*
|
/*
|
||||||
* Loads the translation files.
|
* Loads the translation files at the init action to prevent "too early" warnings in WP 6.7+
|
||||||
*/
|
*/
|
||||||
|
add_action('init', function() {
|
||||||
load_plugin_textdomain('wp-ultimo', false, dirname((string) WP_ULTIMO_PLUGIN_BASENAME) . '/lang');
|
load_plugin_textdomain('wp-ultimo', false, dirname((string) WP_ULTIMO_PLUGIN_BASENAME) . '/lang');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user