From 4414e315b5a23c1206739e006bea81e4d03d4ca5 Mon Sep 17 00:00:00 2001 From: Bart Jaskulski <bjaskulski@protonmail.com> Date: Mon, 18 Nov 2024 15:59:18 +0100 Subject: [PATCH] fix: remove translations loading in plugin Builder doesn't have to handle translations loading itself, as this is done by `wpdesk/wp-plugin-flow-common` and this responsibility is now duplicated. Sometimes loading i18n here may lead to conflicts because of invalid paths and destroy loading process. Signed-off-by: Bart Jaskulski <bjaskulski@protonmail.com> --- src/Plugin/AbstractPlugin.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/Plugin/AbstractPlugin.php b/src/Plugin/AbstractPlugin.php index 3ffd500..607692f 100644 --- a/src/Plugin/AbstractPlugin.php +++ b/src/Plugin/AbstractPlugin.php @@ -152,22 +152,13 @@ abstract class AbstractPlugin extends SlimPlugin { protected function hooks() { add_action( 'admin_enqueue_scripts', [ $this, 'admin_enqueue_scripts' ] ); add_action( 'wp_enqueue_scripts', [ $this, 'wp_enqueue_scripts' ] ); - add_action( 'plugins_loaded', [ $this, 'load_plugin_text_domain' ] ); add_filter( 'plugin_action_links_' . plugin_basename( $this->get_plugin_file_path() ), [ $this, 'links_filter' ] ); } - /** - * Initialize plugin test domain. This is a hook function. Do not execute directly. - * - * @return void - */ - public function load_plugin_text_domain() { - load_plugin_textdomain( $this->get_text_domain(), '', $this->get_namespace() . '/lang/' ); - } - /** + /** * Append JS scripts in the WordPress admin panel. This is a hook function. Do not execute directly. * * @return void -- GitLab