Skip to content

Commit af3d204

Browse files
Fix sidebar label element.
1 parent 2bc271c commit af3d204

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

includes/functions.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -301,12 +301,16 @@ function sidebar_list() {
301301
// List markup.
302302
$html = '<div class="list-wrap cats-list-wrap-wrap plugin plugin-cats-list">';
303303
if ( ! empty( plugin()->label() ) ) {
304-
$html .= sprintf(
305-
'%1$s%2$s%3$s',
306-
$label_el_open,
307-
plugin()->label(),
308-
$label_el_close
309-
);
304+
if ( plugin()->label_wrap() ) {
305+
$html .= sprintf(
306+
'%1$s%2$s%3$s',
307+
$label_el_open,
308+
plugin()->label(),
309+
$label_el_close
310+
);
311+
} else {
312+
$html .= plugin()->label();
313+
}
310314
}
311315
if ( checkRole( [ 'admin' ], false ) && 'select' == plugin()->display() && ! selected_cats() ) {
312316
$html .= sprintf(

0 commit comments

Comments
 (0)