You are here

function node_convert_node_operations in Node Convert 7

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

Implements hook_node_operations().

File

./node_convert.module, line 158

Code

function node_convert_node_operations() {
  $operations = array();
  $templates = node_convert_load_all_templates();
  foreach ($templates as $row) {
    $access = node_convert_check_template_permission_user(array(
      'template_id' => $row->machine_name,
    ));
    if ($access) {
      $operations['node_convert_' . $row->machine_name] = array(
        'label' => 'Convert template: ' . $row->name,
        'callback' => 'node_convert_convert_nodes_using_template',
        'callback arguments' => array(
          $row->machine_name,
        ),
      );
    }
  }
  return $operations;
}