| 1 |
<?php |
| 2 |
if ( ! isset( $current_category ) ) { |
| 3 |
return; |
| 4 |
} |
| 5 |
|
| 6 |
$count_suffix_singular = betterdocs()->settings->get( 'count_text_singular' ); |
| 7 |
$count_suffix = betterdocs()->settings->get( 'count_text' ); |
| 8 |
$_counts = [ |
| 9 |
'counts' => $found_posts, |
| 10 |
'prefix' => ! empty( $count_prefix ) ? $count_prefix : '', |
| 11 |
'suffix' => ! empty( $count_suffix ) ? $count_suffix : '', |
| 12 |
'suffix_singular' => ! empty( $count_suffix_singular ) ? $count_suffix_singular : '' |
| 13 |
]; |
| 14 |
?> |
| 15 |
|
| 16 |
<div class="<?php echo $blockId; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> betterdocs-main-category-folder"> |
| 17 |
<div class="betterdocs-category-header"> |
| 18 |
<div class="betterdocs-category-header-inner"> |
| 19 |
<?php |
| 20 |
$view_object->get( |
| 21 |
'template-parts/category-icon', |
| 22 |
[ |
| 23 |
'show_icon' => $show_icon, |
| 24 |
'category_icon' => 'folder-open', |
| 25 |
'term_id' => isset( $current_category->term_id ) ? $current_category->term_id : '' |
| 26 |
] |
| 27 |
); |
| 28 |
|
| 29 |
$view_object->get( |
| 30 |
'template-parts/category-title', |
| 31 |
[ |
| 32 |
'title' => isset( $current_category->name ) ? $current_category->name : '', |
| 33 |
'tag' => $title_tag |
| 34 |
] |
| 35 |
); |
| 36 |
|
| 37 |
$view_object->get( |
| 38 |
'template-parts/sub-category-counter', |
| 39 |
[ |
| 40 |
'show_count' => $show_count, |
| 41 |
'counts' => $_counts |
| 42 |
] |
| 43 |
); |
| 44 |
?> |
| 45 |
</div> |
| 46 |
</div> |
| 47 |
</div> |
| 48 |
|