use wcf\system\Regex;
use wcf\system\request\LinkHandler;
use wcf\system\style\FontAwesomeIcon;
-use wcf\system\style\FontAwesomeIconBrand;
-use wcf\system\style\IFontAwesomeIcon;
use wcf\system\WCF;
/**
/**
* @since 6.0
*/
- public function getIcon(): ?IFontAwesomeIcon
+ public function getIcon(): ?FontAwesomeIcon
{
if ($this->iconClassName && !\str_starts_with($this->iconClassName, 'fa-')) {
- if (\str_starts_with($this->iconClassName, '@brand:')) {
- return FontAwesomeIconBrand::fromName(\substr($this->iconClassName, 7));
- } else {
- return FontAwesomeIcon::fromString($this->iconClassName);
- }
+ return FontAwesomeIcon::fromString($this->iconClassName);
}
return FontAwesomeIcon::fromValues('bars');
protected function getElement(\DOMXPath $xpath, array &$elements, \DOMElement $element)
{
if ($element->tagName === 'iconclassname') {
- $isBrandIcon = $element->getAttribute('type') === 'brand';
- if ($isBrandIcon) {
- $elements['iconClassName'] = \sprintf(
- "@brand:%s",
- $element->nodeValue,
- );
- } else {
- $solid = $element->getAttribute('solid');
- $elements['iconClassName'] = \sprintf(
- "%s;%s",
- $element->nodeValue,
- $solid === 'true' ? 'true' : 'false'
- );
- }
+ $solid = $element->getAttribute('solid');
+ $elements['iconClassName'] = \sprintf(
+ "%s;%s",
+ $element->nodeValue,
+ $solid === 'true' ? 'true' : 'false'
+ );
} else {
$elements[$element->tagName] = $element->nodeValue;
}