remove class “sub-menu” from wordpress drop down menu

For anybody interested in the code to remove any class you want. I Just worked with the Roots theme and they did the replacement like below. You can just add the class you want to replace in the list.

/**
 * Replace various active menu class names with "active" or nothing
 *
 */

function roots_wp_nav_menu($text) {
  $replace = array(
    'current-menu-item'     => 'active',
    'current-menu-parent'   => 'active',
    'menu-item-type-post_type' => '',
    'menu-item-object-page' => '',
  );

  $text = str_replace(array_keys($replace), $replace, $text);
  return $text;
}

add_filter('wp_nav_menu', 'roots_wp_nav_menu');

deneme bonusudeneme bonusu veren sitelerpulibet girişOnwin Güncel Giriştürkçe altyazılı pornocanlı bahis casino