Add workaround for translations for of opt-in block in editor

We currently don't have tooling for passing translations from scripts to wp.i18n.
This solution provides a temporary way of passing translated strings to wp.i18n for scripts that are
used outside admin pages that are handled via MailPoet.
[MAILPOET-3920]
This commit is contained in:
Rostislav Wolny
2021-11-17 15:39:06 +01:00
committed by Veljko V
parent f95bd95923
commit b137e3fb0c
3 changed files with 34 additions and 6 deletions

View File

@@ -752,4 +752,11 @@ class Functions {
public function wpSetScriptTranslations(string $handle, string $domain = 'default', string $path = null): bool {
return wp_set_script_translations($handle, $domain, $path);
}
/**
* @return \WP_Scripts
*/
public function getWpScripts() {
return wp_scripts();
}
}