Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class duplicate validation error fix #4

Merged
merged 2 commits into from May 6, 2021
Merged

Class duplicate validation error fix #4

merged 2 commits into from May 6, 2021

Conversation

asifpix
Copy link
Contributor

@asifpix asifpix commented May 4, 2021

Now this walker will output class only once.

Copy link
Owner

@AlexWebLab AlexWebLab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about to replace this:
$item_output .= ($depth > 0) ? '<a' . $attributes . '>' : '<a' . $attributes . '>';
with this:
$item_output .= '<a' . $attributes . '>';

@AlexWebLab AlexWebLab merged commit 938969c into AlexWebLab:main May 6, 2021
@AlexWebLab
Copy link
Owner

I've also replaced this:
$nav_link_class = ( $depth > 0 ) ? 'dropdown-item nav-link ' : 'nav-link ';
with this:
$nav_link_class = ( $depth > 0 ) ? 'dropdown-item ' : 'nav-link ';
because, according to the official documentation, when an anchor tag is grandchild of a .dropdown-menu class then it has only .dropdown-item class and not .nav-link class.

@asifpix
Copy link
Contributor Author

asifpix commented May 6, 2021

Thanks for the fix. I am removing the fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants