Add html to li for active-trail menu links Ive used the theme override below to add a span to the end of the li of my menu links. This is working but I need it so the span is only added to the active-train li.  

function MYTHEMENAME_menu_link(array $variables) {
  $element = $variables['element'];
  $sub_menu = '';

  if ($element['#below']) {
    $sub_menu = drupal_render($element['#below']);
  }
  $output = l($element['#title'], $element['#href'], $element['#localized_options']);
  return '&lt;li' . drupal_attributes($element['#attributes']) . '&gt;' . $output . $sub_menu . ' &lt;span&gt;Something&lt;/span&gt; ' . "&lt;/li&gt;\n";
}
You can check if $element['#localized_options']['attributes']['class'] contain active-trail class and create your custom span based on this information.

function MYTHEMENAME_menu_link(array $variables) {
  $element = $variables['element'];
  $sub_menu = '';
  $span = '';

  if ($element['#below']) {
    $sub_menu = drupal_render($element['#below']);
  }

  if (isset($element['#localized_options']['attributes']['class'])) {
    if (in_array('active-trail', $element['#localized_options']['attributes']['class'])) {
      $span = '&lt;span&gt;Something&lt;/span&gt;';
    }
  }

  $output = l($element['#title'], $element['#href'], $element['#localized_options']);
  return '&lt;li' . drupal_attributes($element['#attributes']) . '&gt;' . $output . $sub_menu . $span . "&lt;/li&gt;\n";
}