| 1 |
<?php |
| 2 |
$current_term = ( isset( $_GET['doc_category'] ) ) ? $_GET['doc_category'] : ''; |
| 3 |
|
| 4 |
$terms_object = [ |
| 5 |
'taxonomy' => 'doc_category', |
| 6 |
'hide_empty' => false |
| 7 |
]; |
| 8 |
|
| 9 |
$terms = get_terms( apply_filters( 'betterdocs_category_terms_object', $terms_object ) ); |
| 10 |
?> |
| 11 |
<select |
| 12 |
id="dashboard-select-doc_category" |
| 13 |
class="dashboard-search-field dashboard-select-category" name="doc_category"> |
| 14 |
<option value="all"><?php _e( 'All Categories', 'betterdocs' )?></option> |
| 15 |
<?php |
| 16 |
foreach ( $terms as $term ) { |
| 17 |
echo betterdocs()->template_helper->option_kses( $term->slug, $term->name, $current_term ); |
| 18 |
} |
| 19 |
?> |
| 20 |
</select> |
| 21 |
|