From 35fcffde1bf5acefea87d70dca5e4ab3349f872d Mon Sep 17 00:00:00 2001 From: Sascha Greuel Date: Fri, 1 May 2026 10:30:03 +0200 Subject: [PATCH] Add extension point for custom stored Font Awesome icons Allow FontAwesomeIcon to resolve non-native stored icon strings through a new StoredIconResolving event. This keeps native `name;solid` icon strings unchanged while giving packages a package-safe way to provide custom IFontAwesomeIcon implementations for extended descriptors. Also extend the FontAwesome picker callback contract with optional stored value and preview HTML arguments, and update IconFormField and trophy badge preview handling to use those optional values when provided. --- .../templates/shared_iconFormField.tpl | 29 ++++++--- ts/WoltLabSuite/Core/Acp/Ui/Trophy/Badge.ts | 25 +++++-- ts/WoltLabSuite/Core/Ui/Style/FontAwesome.ts | 6 +- .../WoltLabSuite/Core/Acp/Ui/Trophy/Badge.js | 22 +++++-- .../WoltLabSuite/Core/Ui/Style/FontAwesome.js | 4 +- .../event/style/StoredIconResolving.class.php | 24 +++++++ .../system/style/FontAwesomeIcon.class.php | 65 +++++++++++++++---- 7 files changed, 142 insertions(+), 33 deletions(-) create mode 100644 wcfsetup/install/files/lib/event/style/StoredIconResolving.class.php diff --git a/com.woltlab.wcf/templates/shared_iconFormField.tpl b/com.woltlab.wcf/templates/shared_iconFormField.tpl index 656071753fb..6c8f03a21bc 100644 --- a/com.woltlab.wcf/templates/shared_iconFormField.tpl +++ b/com.woltlab.wcf/templates/shared_iconFormField.tpl @@ -13,34 +13,43 @@ {if $__iconFormFieldIncludeJavaScript} {include file='shared_fontAwesomeJavaScript'} {/if} - +