<?php

$menus = array(
    'main_menu' => __('Main Menu'),
    'footer_menu' => __('Footer Menu'),
    'construction_menu' => __('Construction top Menu'),
    'explore_menu' => __('Explore top Menu'),
    'about_menu' => __('About top Menu'),
    'home_menu' => __('Home top Menu'),
    'environments_menu' => __('Environments top Menu'),

);



register_nav_menus( $menus );


add_filter( 'nav_menu_css_class', 'custom_active_item_classes', 10, 2 );

function custom_active_item_classes($classes = array(), $menu_item = false){
    global $post;
    if (isset($post->post_type)) {
        $classes[] = ($menu_item->url == get_post_type_archive_link($post->post_type)) ? 'current-menu-item active' : '';
    }
    return $classes;
}


