| | |
| | | return $out; |
| | | } |
| | | |
| | | function jvbMetaTermList(string $value, string $tax, bool $icon = true):string |
| | | function jvbMetaTermList(string $value, string $tax, bool $icon = true, bool $showTaxonomy = true):string |
| | | { |
| | | if ($value === '') { |
| | | return ''; |
| | |
| | | $registrar = Registrar::getInstance($tax); |
| | | $icon = ($icon && $registrar) ? $registrar->getIcon() : ''; |
| | | $icon = ($icon === '') ? '' : jvbIcon($icon); |
| | | $title = $registrar ? '<li class="title">'.$icon.$registrar->getSingular().'</li>' : ''; |
| | | $singular = ''; |
| | | if ($registrar) { |
| | | $singular = $showTaxonomy ? $registrar->getSingular() : '<span class="screen-reader-text">'.$registrar->getSingular().'</span>'; |
| | | } |
| | | |
| | | $title = $registrar ? '<li class="title">'.$icon.$singular.'</li>' : ''; |
| | | return (!empty($out)) ? '<ul class="term-list row left '.jvbNoBase($tax).'">'.$title.implode('',$out).'</ul>' : ''; |
| | | } |
| | | |