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:
committed by
Veljko V
parent
f95bd95923
commit
b137e3fb0c
@@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user