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

Add a second Nav_Walker for Secondary Menu #4235

Merged
merged 4 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
'fallback_cb' => '__return_false',
'before' => '<div class="wrap">',
'after' => '</div>',
'walker' => '\Neve\Views\Secondary_Nav_Walker',
)
);
?>
Expand Down
26 changes: 26 additions & 0 deletions inc/views/secondary_nav_walker.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
/**
* Custom navwalker for secondary menu.
*
* Author: Soare Robert <[email protected]>
* Created on: 25/04/2024
*
* @package Neve\Views
*/

namespace Neve\Views;

/**
* Class Secondary_Nav_Walker
*
* @package Neve\Views
*/
class Secondary_Nav_Walker extends Nav_Walker {

/**
* Secondary_Nav_Walker constructor.
*/
public function __construct() {
add_action( 'neve_after_header_wrapper_hook', [ $this, 'inline_style_for_sidebar' ], 9 );
}
}
Loading