diff --git a/formatters/BasicFormatter.php b/formatters/BasicFormatter.php index 8d3bce35c..f9f1aa612 100644 --- a/formatters/BasicFormatter.php +++ b/formatters/BasicFormatter.php @@ -191,6 +191,10 @@ class EchoBasicFormatter extends EchoNotificationFormatter { if ( !isset( $iconInfo['path'] ) || !$iconInfo['path'] ) { // Fallback in case icon is not configured; mainly intended for 'site' $iconInfo = $wgEchoNotificationIcons['placeholder']; + } else { + if ( is_callable( $iconInfo['path'] ) ) { + $iconInfo['path'] = call_user_func( $iconInfo['path'] ); + } } $iconUrl = "$wgExtensionAssetsPath/{$iconInfo['path']}"; } diff --git a/includes/EmailFormatter.php b/includes/EmailFormatter.php index 61b23e3ad..fcfba2c32 100644 --- a/includes/EmailFormatter.php +++ b/includes/EmailFormatter.php @@ -177,6 +177,10 @@ abstract class EchoEmailMode { } else { if ( !isset( $iconInfo['path'] ) || !$iconInfo['path'] ) { $iconInfo = $wgEchoNotificationIcons['placeholder']; + } else { + if ( is_callable( $iconInfo['path'] ) ) { + $iconInfo['path'] = call_user_func( $iconInfo['path'] ); + } } $iconUrl = "$wgExtensionAssetsPath/{$iconInfo['path']}"; }