1.20.x system.theme.inc | theme_label_machine_name($variables) |
Returns HTML for the display of a label and its machine name.
Parameters
array $variables: An associative array containing:
- label: The human-readable label.
- machine_name: (optional) The machine-safe name.
Related topics
File
- modules/
system/ system.theme.inc, line 812 - Theme functions for the System module.
Code
function theme_label_machine_name($variables) {
$output = '<div class="label">' . check_plain($variables['label']) . '</div>';
if (!empty($variables['machine_name'])) {
$machine_name = t('Machine name: @machine_name', array('@machine_name' => $variables['machine_name']));
$output .= '<div class="machine-name">(' . $machine_name . ')</div>';
}
return $output;
}