How to style menu local tasks
theme_menu_local_tasks() will never be invoked using those two methods, so it makes sense that your dpm() fails.

Both functions do eventually invoke hook_menu_local_tasks_alter(), though, and that's where you can make your changes:

function MYTHEME_menu_local_tasks_alter(&amp;$data, $router_item, $root_path) {
  if ($some_condition) {
    // Grab the first tab.
    $first_tab = &amp;$data['tabs'][0]['output'][0];

    // Add a class to the link element.
    $first_tab['#link']['localized_options']['attributes']['class'][] = 'some-class';
  }
}


If you want to add a class to the &lt;li&gt; element you'll need to go a step further, and override theme_menu_local_task(). 

The class attribute is hard-coded at the moment so that'll will need to be changed, based on a contextual variable you can pass into the theme function from the local tasks hook above.

That would look something like this in the alter hook

$first_tab['#extra_class'] = 'some-class';


And along these lines for the theme function

function MYTHEME_menu_local_task($vars) {
  // Copy the code from theme_menu_local_task() but change the HTML output
  // to include an extra class if $vars['extra_class'] is set
}


You might also need to implement hook_theme_registry_alter() to let it know about the new variable (can't remember if it matters but it can't hurt)

function MYTHEME_theme_registry_alter(&amp;$theme_registry) {
  $theme_registry['menu_local_task']['variables']['extra_class'] = NULL;
}