mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-12 09:26:05 +00:00
Merge "Allow defining clousre for notification icon path"
This commit is contained in:
commit
bd07f60b33
|
@ -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']}";
|
||||
}
|
||||
|
|
|
@ -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']}";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue