You are here

function node_convert_node_operations in Node Convert 6

Same name and namespace in other branches
  1. 7 node_convert.module \node_convert_node_operations()

Implementation of hook_node_operations().

File

./node_convert.module, line 120
The node_convert module converts nodes from one type to another.

Code

function node_convert_node_operations() {
  $operations = array();
  $result = db_query("SELECT name, nctid FROM {node_convert_templates}");
  while ($row = db_fetch_array($result)) {
    $access = node_convert_check_template_permission_user(array(
      'template_id' => $row['nctid'],
    ));
    if ($access) {
      $operations['node_convert_' . $row['nctid']] = array(
        'label' => 'Convert template: ' . $row['name'],
        'callback' => 'node_convert_convert_nodes_using_template',
        'callback arguments' => array(
          $row['nctid'],
        ),
      );
    }
  }
  return $operations;
}