Adding/Editing Node tab links through preprocess method
All _alter() hooks can be implemented by themes as well as modules, so in that specific case you can just use

function mytheme_contextual_links_view_alter(&amp;$element, &amp;$items) {
  ...