atrcode_extract

Versions
6.1
atrcode_extract($path, $api_version)

Extract texts from code files.

Parameters

$path The path to the code files.

$api_version The verison of Drupal core the code is compatible with.

Code

atr/modules/atrcode/includes/atrcode.extract.inc, line 16

<?php
function atrcode_extract($path, $api_version) {
  global $atr_strings;

  module_load_include('inc', 'potx', 'potx');

  potx_status('set', POTX_STATUS_SILENT);
  $code_files = _potx_explore_dir($path);
  foreach ($code_files as $code_file) {
    _potx_process_file($code_file, 0, '_atrcode_potx_save_string', '_atrcode_potx_save_version', $api_version);
  }

  // TODO: Generalise string location storage. Not all strings may be found in
  // files.
  if ($atr_strings) {
    module_load_include('inc', 'atr', 'includes/atr.extract');
    atr_filepath($atr_strings, $path);
  }
}
?>