WordPress get or set active menu class

This is relatively easily done with a filter.

function alter_menu_class_wpse_113022($args) {
  // var_dump($args); // debug
  $args['menu_class'] = 'my-nav-menu';
  return $args;
}
add_filter('wp_nav_menu_args','alter_menu_class_wpse_113022');

That will make this line:

<ul id="menu-scroll" class="nav-menu">

Look like this one:

<ul id="menu-scroll" class="my-nav-menu">

But that could cause themes to break horribly. If a theme has used that class to apply styles to the menu, which would be a reasonable thing to do, you’ve just broken all of that styling. The effected menus will look terrible and may not even function. This is a very, very bad idea. Please don’t do it.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)