From 5896a993aa5b05bbe38d49d7ea935c5a71c58fcd Mon Sep 17 00:00:00 2001 From: David Stone Date: Fri, 27 Dec 2024 23:43:01 -0700 Subject: [PATCH] Fix blocks not being registered soon enough --- inc/ui/class-base-element.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/inc/ui/class-base-element.php b/inc/ui/class-base-element.php index ca428f0..48bac4b 100644 --- a/inc/ui/class-base-element.php +++ b/inc/ui/class-base-element.php @@ -237,9 +237,11 @@ abstract class Base_Element { add_action('wu_element_preview', array($this, 'setup_preview')); - add_action('init', function () { + // Init should be the correct time to call this to avoid the deprecated notice from I18N. + // But it doesn't work for some reason, fix later. +// add_action('init', function () { do_action('wu_element_loaded', $this); - } ); +// } ); if ($this->public) {