';
$description = (string) ($attrs['description'] ?? '');
if ('' !== $description) {
$html .= '
' . $description . '
';
}
$total_time = self::format_total_time($attrs);
if ('' !== $total_time) {
$html .= '
Total time: '
. self::escape_html($total_time) . '
';
}
$list_tag = self::HOWTO_DEFAULTS['showNumbers'] ? 'ol' : 'ul';
$html .= '<' . $list_tag . ' class="thinkrank-howto__steps">';
foreach ($items as $step) {
$html .= '
';
$html .= ''
. (string) ($step['title'] ?? '') . '
';
if ('' !== ($step['imageUrl'] ?? '')) {
$html .= '
';
}
$html .= ''
. (string) ($step['text'] ?? '') . '
';
$html .= '';
}
return $html . '' . $list_tag . '>
';
}
/**
* PHP port of the HowTo block's formatTotalTime() helper.
*
* @param array