diff --git a/functions.php b/functions.php index e82f376c..3e69c966 100644 --- a/functions.php +++ b/functions.php @@ -305,7 +305,7 @@ add_action('wp_footer', function() use ($container) { * - Frontend: Inyecta CSS crítico (head) y diferido (footer) * - Admin: El FormBuilder se auto-registra cuando es instanciado por el dashboard */ -add_action('after_setup_theme', function() { +add_action('wp', function() { // Solo inyectar CSS en frontend (no admin) if (is_admin()) { return; @@ -328,7 +328,7 @@ add_action('after_setup_theme', function() { // Registrar hooks $injector->register(); -}, 5); // Priority 5: después de theme setup básico +}); // Hook 'wp' se ejecuta después de que WordPress determina el query // ============================================================================= // 5.3. INFORMACIÓN DE DEBUG (Solo en desarrollo)