You are here

function coder_upgrade_upgrade_hook_hook_info_alter in Coder 7

Same name and namespace in other branches
  1. 7.2 coder_upgrade/conversions/function.inc \coder_upgrade_upgrade_hook_hook_info_alter()

Implements hook_upgrade_hook_hook_info_alter().

File

coder_upgrade/conversions/function.inc, line 358
Provides conversion routines applied to functions (or hooks).

Code

function coder_upgrade_upgrade_hook_hook_info_alter(&$node, &$reader) {

  // Changes: trigger_overhaul
  $item =& $node->data;
  global $_coder_upgrade_module_name;

  // Rename function.
  $item->name = $_coder_upgrade_module_name . '_trigger_info';

  // Update document comment.
  $item->comment = preg_replace('@hook_hook_info@', "hook_trigger_info", $item->comment);

  // Restructure the triggers array.
  coder_upgrade_convert_return($node->data->body, 'hook_info', '', 1, 1);
}