Example of WordPress default CSS class output:
&l
this is an addition on top of Richard answer.
in case you want to change the current-menu-item class to something else.
add_filter('nav_menu_css_class', 'my_css_attributes_filter', 100, 1);
add_filter('nav_menu_item_id', 'my_css_attributes_filter', 100, 1);
function my_css_attributes_filter($var) {
if(is_array($var)){
$varci= array_intersect($var, array('current-menu-item'));
$cmeni = array('current-menu-item');
$selava = array('selectedmenu');
$selavaend = array();
$selavaend = str_replace($cmeni, $selava, $varci);
}
else{
$selavaend= '';
}
return $selavaend;
}