diff --git a/lazy-blocks.php b/lazy-blocks.php index a9abbcfe..b27195ce 100644 --- a/lazy-blocks.php +++ b/lazy-blocks.php @@ -130,10 +130,19 @@ public function deactivation_hook() {} * Init. */ public function init() { + add_action( 'init', array( $this, 'init_hook' ), 5 ); + } + + /** + * Init hook should be used to register user blocks and add customizations. + */ + public function init_hook() { $this->plugin_path = plugin_dir_path( __FILE__ ); $this->plugin_url = plugin_dir_url( __FILE__ ); $this->plugin_basename = plugin_basename( __FILE__ ); + $this->load_text_domain(); + $this->include_dependencies(); $this->icons = new LazyBlocks_Icons(); @@ -143,15 +152,6 @@ public function init() { $this->templates = new LazyBlocks_Templates(); $this->tools = new LazyBlocks_Tools(); - add_action( 'init', array( $this, 'init_hook' ), 5 ); - - add_action( 'plugins_loaded', array( $this, 'load_text_domain' ) ); - } - - /** - * Init hook should be used to register user blocks and add customizations. - */ - public function init_hook() { do_action( 'lzb/init' ); }