Skip to content
Snippets Groups Projects
Verified Commit 9b6a1708 authored by Bartek Jaskulski's avatar Bartek Jaskulski
Browse files

Revert "feat: WordPress 6.7 compatibility change"

This reverts commit fa051ae0.

This commit was wrong, as translation files may be registered at
`plugins_loaded`, it's the i18n functions (e.g. `__`) that should be
deferred after `init` hook.
parent 67f93a28
No related branches found
No related tags found
1 merge request!5feat: remove compilation command
This commit is part of merge request !5. Comments created here will be created in the context of that merge request.
......@@ -14,7 +14,11 @@ class I18n implements Hookable {
}
public function hooks(): void {
add_action( 'init', $this );
if ( did_action( 'plugins_loaded' ) ) {
$this->__invoke();
} else {
add_action( 'plugins_loaded', $this );
}
}
public function __invoke(): void {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment