customizable menu button
This commit is contained in:
parent
d4b709dfc5
commit
0892fab0ac
2 changed files with 24 additions and 2 deletions
|
|
@ -10,13 +10,22 @@ function kit_setup() {
|
|||
|
||||
register_nav_menus( array(
|
||||
'primary' => 'Main Menu',
|
||||
'secondary' => 'Footer Menu'
|
||||
'secondary' => 'Footer Menu',
|
||||
'extra' => 'Extra Menu'
|
||||
) );
|
||||
|
||||
};
|
||||
|
||||
add_action( 'after_setup_theme', 'kit_setup' );
|
||||
|
||||
function add_menu_link_class( $atts, $item, $args ) {
|
||||
if (property_exists($args, 'link_class')) {
|
||||
$atts['class'] = $args->link_class;
|
||||
}
|
||||
return $atts;
|
||||
}
|
||||
add_filter( 'nav_menu_link_attributes', 'add_menu_link_class', 1, 3 );
|
||||
|
||||
class kit_custom_main_menu extends Walker_Nav_Menu {
|
||||
|
||||
function start_lvl( &$output, $depth = 0, $args = array() ) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue