'; $i = 0; foreach ($status as $value => $oneStatus) { $class = $value == $current ? 'acyc__listing__status__selected' : ''; if ($i != 0) $statusHtml .= '|'; $statusHtml .= ''.$oneStatus['text'].' ('.$oneStatus['number'].')'; $i++; } $statusHtml .= ''; return $statusHtml; } public static function yesNo($value, int $colorCode = self::RED_FOR_YES): string { if (intval($value) === 0) { $text = __('No', 'acychecker'); $color = $colorCode === self::RED_FOR_YES ? 'green' : 'red'; } else { $text = __('Yes', 'acychecker'); $color = $colorCode === self::RED_FOR_YES ? 'red' : 'green'; } if ($colorCode === self::NO_COLOR) { return $text; } return ''.$text.''; } }