function custom_breadcrumbs_features_transliterate in Custom Breadcrumbs Features 7.2
Transliterate a human readable name into a machine name.
Parameters
$name: Human readable name to convert.
$maxlength: Maximum length of machine name.
Return value
Machine name.
See also
Drupal.behaviors.machineName.transliterate().
1 call to custom_breadcrumbs_features_transliterate()
- custom_breadcrumbs_features_generate_missing_machine_names in ./
custom_breadcrumbs_features.install - Generates machine names for crumbs that do not have one.
File
- ./
custom_breadcrumbs_features.install, line 186 - Install file for custom_breadcrumbs_features.
Code
function custom_breadcrumbs_features_transliterate($name, $maxlength) {
$name = drupal_strtolower($name);
$name = preg_replace('/[^a-z0-9_]+/', '_', $name);
$name = drupal_substr($name, 0, $maxlength);
return $name;
}