function _potx_add_default_region_names in Translation template extractor 6.3
Same name and namespace in other branches
- 8 potx.inc \_potx_add_default_region_names()
- 5.2 potx.inc \_potx_add_default_region_names()
- 5 potx.inc \_potx_add_default_region_names()
- 6 potx.inc \_potx_add_default_region_names()
- 6.2 potx.inc \_potx_add_default_region_names()
- 7.3 potx.inc \_potx_add_default_region_names()
- 7 potx.inc \_potx_add_default_region_names()
- 7.2 potx.inc \_potx_add_default_region_names()
Add default theme region names, which cannot be extracted otherwise. These default names are defined in system.module
Parameters
$file: Name of the file parsed.
$save_callback: Callback function used to save strings.
$api_version: Drupal API version to work with.
1 call to _potx_add_default_region_names()
- _potx_process_file in ./
potx.inc - Process a file and put extracted information to the given parameters.
File
- ./
potx.inc, line 1536 - Extraction API used by the web and command line interface.
Code
function _potx_add_default_region_names($file, $save_callback, $api_version = POTX_API_CURRENT) {
$regions = array(
'left' => 'Left sidebar',
'right' => 'Right sidebar',
'content' => 'Content',
'header' => 'Header',
'footer' => 'Footer',
);
if ($api_version > POTX_API_6) {
$regions['highlight'] = 'Highlighted';
$regions['help'] = 'Help';
$regions['page_top'] = 'Page top';
$regions['page_top'] = 'Page bottom';
}
foreach ($regions as $region) {
// Regions come with the default context.
$save_callback($region, POTX_CONTEXT_NONE, $file);
}
}