query->get_posts( $query_args, true );
if ( ! $posts->have_posts() ) {
wp_reset_postdata();
}
$_page_id = null;
if ( is_single() ) {
$_page_id = get_the_ID();
}
?>
0 ) {
while ( $posts->have_posts() ):
$posts->the_post();
$_link_attributes = array(
'href' => esc_url( get_the_permalink() )
);
if ( get_the_ID() === $_page_id && Helper::get_tax() != 'doc_category' ) {
$_link_attributes[ 'class' ] = 'active';
}
$_link_attributes = betterdocs()->template_helper->get_html_attributes( $_link_attributes );
echo wp_sprintf(
'- %2$s
',
$_link_attributes, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
// Same per-item filter as category-list.php (API method badges etc.).
apply_filters( 'betterdocs_docs_list_item_title', betterdocs()->template_helper->kses( get_the_title() ), get_the_ID() ), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
);
endwhile;
wp_reset_postdata();
}
?>