Fix issues #10 and #15: Move Site_Query loading to Sunrise class and fix textdomain loading

This commit is contained in:
2025-04-15 00:05:50 +01:00
parent 410571a802
commit bb405f24f2
2 changed files with 7 additions and 3 deletions

View File

@ -235,9 +235,11 @@ final class WP_Ultimo {
*/
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+
*/
load_plugin_textdomain('wp-ultimo', false, dirname((string) WP_ULTIMO_PLUGIN_BASENAME) . '/lang');
add_action('init', function() {
load_plugin_textdomain('wp-ultimo', false, dirname((string) WP_ULTIMO_PLUGIN_BASENAME) . '/lang');
});
}
/**