How do I theme (add extra markup to) menu links in Drupal 7? I have a secondary menu that displays like:

&lt;ul class="secondarynav"&gt;
&lt;li class="menu-428 first"&gt;
&lt;a href="/content/page"&gt;PAGE&lt;/a&gt;
&lt;/li&gt;
...


I would like to change that so it displays a &lt;span&gt; on the links like:

&lt;ul class="secondarynav"&gt;
&lt;li class="menu-428 first"&gt;
&lt;a href="/content/page"&gt;&lt;span&gt;PAGE&lt;/span&gt;&lt;/a&gt;
&lt;/li&gt;
...


According to the Drupal 7 theme_menu_link documentation and this answer on theming Drupal 7 menu links, I should just be able to declare a hook like THEMENAME_menu_link__MENUNAME($variables).

I've declared the following two functions in my template.php, but neither of them is being called:

function MYTEMPLATE_menu_link__system_secondary_menu(array $variables) {die;}
function MYTEMPLATE_menu_link__secondary_menu(array $variables) {die;}


I'm using Framework, and there's a section like:

if (isset($vars['secondary_menu'])) {
    $vars['secondary_menu'] = theme('links__system_secondary_menu', array(
        'links' =&gt; $vars['secondary_menu'],
        'attributes' =&gt; array(
        'class' =&gt; array('secondaryNavigation'),
    )
    ));
}


What's the cleanest / best practice-y way of printing an extra &lt;span&gt; in the menu links for this menu only?

I can write a function to theme the entire menu at once with function MYTEMPLATE_links__system_secondary_menu(array $variables), but theming the entire menu  just to get a &lt;span&gt; in each link seems like overkill.
It calls theme('links__system_secondary_menu'). By default, there is no theme_links__system_secondary_menu, so I guess it is calling theme_links. Looking at the function, all you have to do is copy it to your theme as THEMENAME_links__system_secondary_menu, then change the call to l() to something like:

$link['html'] = TRUE;
$output .= l('&lt;span class="whatever"&gt;' . $link['title'] . '&lt;/span&gt;', $link['href'], $link);


The html => true is required or l() will strip the html out of its first parameter.