- - 0 ? 'wps-glance-up' : ($metric['change'] < 0 ? 'wps-glance-down' : ''); $color_class = ''; if ($metric['change'] != 0) { $is_negative_polarity = isset($metric['polarity']) && $metric['polarity'] === 'negative'; $is_good_change = ($is_negative_polarity && $metric['change'] < 0) || (!$is_negative_polarity && $metric['change'] > 0); $color_class = $is_good_change ? 'wps-glance-positive' : 'wps-glance-negative'; } $change_value = number_format(abs((float) $metric['change']), 1); ?>