-
Notifications
You must be signed in to change notification settings - Fork 329
Description
kirki/kirki-packages/l10n/src/L10n.php
Lines 57 to 67 in b807cfb
| public function __construct( $textdomain = 'kirki', $languages_path = '' ) { | |
| $this->textdomain = $textdomain; | |
| $this->languages_path = $languages_path; | |
| // This will only work if we're inside a plugin. | |
| add_action( 'plugins_loaded', [ $this, 'load_textdomain' ] ); | |
| // If we got this far, then Kirki is embedded in a plugin. | |
| // We want the theme's textdomain to handle translations. | |
| add_filter( 'override_load_textdomain', [ $this, 'override_load_textdomain' ], 5, 3 ); | |
| } |
I'm using Kirki as a plugin installed on WordPress, but the translation is still being passed to the theme's textdomain. I would like to keep the plugin translation separate from the theme translation. I've tried using different hooks to prevent the default behavior, but I haven't been successful.
The plugin only recognizes its own translation files after commenting out the 'override_load_textdomain' filter linked to the method which is also called 'override_load_textdomain'.
As I said earlier, I tried using the same 'override_load_textdomain' filter to prevent the behavior, but it doesn't seem to prevent the 'override_load_textdomain' method from being started along with the class. I tried to do this through my child theme's functions.php and through a custom plugin.
I don't know if I'm doing something wrong, can anyone help me?