Skip confirmation page on node delete I'm trying to skip delete confirmation page only for a content type in my site.
I found this question but I can't figure out how to modify this code to affect only a nodes in a content type. 
This is the code i found:

function mymodule_menu_alter(&amp;$items) {
  $items['node/%node/delete']['page callback'] = 'my_node_delete_function';
  $items['node/%node/delete']['page arguments'] = array(1);
  $items['node/%node/delete']['module'] = 'mymodule';
}

function my_node_delete_function($node) {
  // Taken from node modules node_delete_confirm submit handler
  node_delete($node-&gt;nid);
  watchdog('content', '@type: deleted %title.', array('@type' =&gt; $node-&gt;type, '%title' =&gt; $node-&gt;title));
  drupal_set_message(t('@type %title has been deleted.', array('@type' =&gt; node_type_get_name($node), '%title' =&gt; $node-&gt;title)));

  // Do a drupal goto here to preserver the 'destination' parameter
  drupal_goto();
}
Just checking the node's type should be enough, and you can default to returning the standard deletion form:

function my_node_delete_function($node) {
  // If the node is of your custom type, delete it straight away.
  if ($node-&gt;type == 'my_type') {
    node_delete($node-&gt;nid);
    // ...
    drupal_goto();
  }
  else {
    // Otherwise, serve the standard node delete page.
    module_load_include('inc', 'node', 'node.pages');
    return drupal_get_form('node_delete_confirm', $node);
  }
}