X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FSmarty%2Fplugins%2Fblock.icon.php;h=8fb0213b497c68c2e5446f7ffc0eec0ccc5fa473;hb=9de5aa1b82d4db922a01f834de5488e204cad0f5;hp=0cdad70186ec367da3a5f16fe5a6a76b0839be87;hpb=313e940d02087e28fc7a5f2e83c7aa545c410d32;p=civicrm-core.git diff --git a/CRM/Core/Smarty/plugins/block.icon.php b/CRM/Core/Smarty/plugins/block.icon.php index 0cdad70186..8fb0213b49 100644 --- a/CRM/Core/Smarty/plugins/block.icon.php +++ b/CRM/Core/Smarty/plugins/block.icon.php @@ -25,6 +25,7 @@ * @param $params * - condition: if present and falsey, return empty * - icon: the icon class to display instead of fa-check + * - anything else is passed along as attributes for the icon * * @param $text * The translated text to include in the icon's title and screen-reader text. @@ -36,5 +37,9 @@ function smarty_block_icon($params, $text, &$smarty) { $condition = array_key_exists('condition', $params) ? $params['condition'] : 1; $icon = $params['icon'] ?? 'fa-check'; - return CRM_Core_Page::crmIcon($icon, $text, $condition); + $dontPass = [ + 'condition' => 1, + 'icon' => 1, + ]; + return CRM_Core_Page::crmIcon($icon, $text, $condition, array_diff_key($params, $dontPass)); }