You are here

function your_module_name_upgrade_regex_info_alter in Coder 7

Same name and namespace in other branches
  1. 7.2 coder_upgrade/coder_upgrade.api.php \your_module_name_upgrade_regex_info_alter()

Implements hook_upgrade_regex_info_alter().

File

coder_upgrade/coder_upgrade.api.php, line 517
Documents hooks provided by this module.

Code

function your_module_name_upgrade_regex_info_alter(&$file) {
  $hook = 'info_file';
  $cur = $file;
  $new = $cur;
  $from = array();
  $to = array();

  // Info file should specify core = 7.x.
  $from[] = '@^core\\s+=\\s+.*?$@m';
  $to[] = 'core = 7.x';
  coder_upgrade_do_conversions($from, $to, $new);
  coder_upgrade_save_changes($cur, $new, $file, $hook);
}