Fix linter errors.

This commit is contained in:
Maria Górska-Piszek 2021-08-13 12:13:50 +02:00
parent 7c2df9f84a
commit 24548f2e3d
2 changed files with 22 additions and 10 deletions

View File

@ -93,15 +93,18 @@
.current-section-dropdown {
position: relative;
margin-left: 70px;
width: 200px;
@media only screen and ( min-width: 600px ) {
margin-left: 70px;
}
}
.current-section-name {
font-weight: 600;
font-size: 14px;
line-height: 20px;
padding: 20px 12px;
padding: 20px 16px;
position: relative;
}
@ -110,11 +113,11 @@
background-size: contain;
content: '';
display: block;
height: 20px;
position: absolute;
right: 20px;
top: 20px;
position: absolute;
width: 20px;
height: 20px;
}
ul {
@ -153,8 +156,20 @@
text-decoration: none;
outline: none;
padding: 10px 18px;
position: relative;
width: 100%;
}
a.current:after {
background-image: url(../images/icons/gridicons-checkmark.svg);
content: '';
display: block;
height: 20px;
position: absolute;
right: 20px;
top: 7px;
width: 20px;
}
}
.current-section-dropdown:hover ul {

View File

@ -40,15 +40,12 @@ $current_section_name = __( 'Browse Categories', woocommerce );
<div class="current-section-dropdown">
<ul>
<?php foreach ( $sections as $section ) : ?>
<?php if( $current_section === $section->slug ) {
<?php if( $current_section === $section->slug && '_featured' !== $section->slug ) {
$current_section_name = $section->label;
$add_current_class = true;
} else {
$add_current_class = false;
} ?>
<li>
<a
class="<?php echo $add_current_class ? 'current' : ''; ?>"
class="<?php echo $current_section === $section->slug ? 'current' : ''; ?>"
href="<?php echo esc_url( admin_url( 'admin.php?page=wc-addons&section=' . esc_attr( $section->slug ) ) ); ?>">
<?php echo esc_html( $section->label ); ?>
</a>