From 484a95421428f196cb80a7a86234497c63a7d547 Mon Sep 17 00:00:00 2001 From: Habibur Rahman Delwar Date: Tue, 8 Sep 2026 12:55:55 +0600 Subject: [PATCH] DOCS: Note that global_addons registration also gates module toggling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The filter's documented location was AddOnModule::showFluentAddOns(). The registry build moved to getRegisteredAddOns() so the module status writer can validate a submitted module_key against the same source the add-ons screen renders from. That makes registration load-bearing beyond display: a key the filter does not return is now rejected when its status is saved. Add-on authors need to know that registering conditionally — only on admin screens, or only while a dependency is active — makes the module un-toggleable, so the note spells it out next to the existing example, which already registers unconditionally. --- src/hooks/filters/integration.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/hooks/filters/integration.md b/src/hooks/filters/integration.md index 8b311b5..c6c68df 100644 --- a/src/hooks/filters/integration.md +++ b/src/hooks/filters/integration.md @@ -298,11 +298,20 @@ add_filter('fluentform/global_addons', function ($addons) use ($isEnabled) { ``` +::: warning Registration also controls toggling +What this filter returns is the list of modules that may be enabled or disabled. +A module key absent from it is rejected when saving its status, so register the +add-on unconditionally — as the example above does — rather than only on admin +screens or only while some dependency is active. An add-on that registers itself +conditionally becomes un-toggleable whenever it opts out. +::: + **Reference** `apply_filters('fluentform/global_addons', $addons);` -This filter is located in FluentForm\app\Modules\AddOnModules -> showFluentAddOns() +This filter is located in FluentForm\app\Modules\AddOnModule -> getRegisteredAddOns(), +which the add-ons screen renders from and the module status writer validates against.