Where is links__node__node() defined? I'm trying to figure out how I can alter the theme for read more links. This is what goes on inside the node.module ~ line 1380.

$node-&gt;content['links']['node'] = array(
  '#theme' =&gt; 'links__node__node',
  '#links' =&gt; $links,
  '#attributes' =&gt; array('class' =&gt; array('links', 'inline')),
);


I know where are several ways to remove the read more links and add your own, but I just want to know where that theme function is stored and how I can override it like it can be done with fields using theme_field().
The "links__node__node" theme function is not defined from any Drupal module. If a module defines a theme function matching that name, then Drupal will use it; otherwise, the function that is going to be used is theme_links().

In your theme, you can define both the theme functions. The difference is that theme_links() is generally used, while the other theme function is used just in a specific case.

function themename_links__node__node(&amp;$variables) {
  $links = $variables['links'];
  $attributes = $variables['attributes'];
  // …
}




function themename_links(&amp;$variables) {
  $links = $variables['links'];
  $attributes = $variables['attributes'];
  $heading = $variables['heading'];
  // …
}