function _potx_form_id in Translation template extractor 7
Same name and namespace in other branches
- 5.2 potx.module \_potx_form_id()
- 5 potx.module \_potx_form_id()
- 6.3 potx.admin.inc \_potx_form_id()
- 6 potx.module \_potx_form_id()
- 6.2 potx.module \_potx_form_id()
- 7.3 potx.admin.inc \_potx_form_id()
- 7.2 potx.admin.inc \_potx_form_id()
Generate a sane form element ID for the current radio button.
Parameters
$type: Type of ID generated: 'fs' for fieldset, 'dir' for directory, 'com' for component.
$path: Path of file we generate an ID for.
Return value
The generated ID.
File
- ./
potx.module, line 265 - Gettext translation template and translation extractor.
Code
function _potx_form_id($type, $path) {
return 'potx-' . $type . '-' . preg_replace('/[^a-zA-Z0-9]+/', '-', $path);
}