Two variables in function
The $variables argument is passed by reference so you can name it whatever you want. There are two common conventions in Drupal for $variables in hook_preprocess functions:


Name it $vars
Name it $variables


I suspect you found some code that you want to use that used $variables; but your existing preprocess function uses $vars. Simply change the references to $variables to $vars in your code above and remove the $variables argument:

/**
 * Implements THEME_preprocess_node().
 */
function salamat_preprocess_node(&amp;$vars) {

  if ($vars['node']-&gt;type == 'article') {
    // Remove Add comment link from teaser.
    unset($vars['content']['links']['comment']['#links']['comment-add']);
    // Remove login/register to comment link.
    unset($vars['content']['links']['comment']['#links']['comment_forbidden']);
  }

  if($vars['view_mode'] == 'teaser') {
    $vars['theme_hook_suggestions'][] = 'node__'.$vars['type'].'__teaser';
    $vars['theme_hook_suggestions'][] = 'node__'.$vars['nid'].'__teaser';
    $temp = drupal_get_query_parameters();
    if(isset($temp['show_mode']) ) {
      $vars['theme_hook_suggestions'][] = 'node__'.$vars['type'].'__teaser__'.$temp['show_mode'];
      $vars['theme_hook_suggestions'][] = 'node__'.$vars['nid'].'__teaser__'.$temp['show_mode'];
    }
  }
}