function themekey_format_rule_as_string in ThemeKey 6.2
Same name and namespace in other branches
- 6.4 themekey_base.inc \themekey_format_rule_as_string()
- 6.3 themekey_base.inc \themekey_format_rule_as_string()
- 7.3 themekey_base.inc \themekey_format_rule_as_string()
- 7 themekey_base.inc \themekey_format_rule_as_string()
- 7.2 themekey_base.inc \themekey_format_rule_as_string()
2 calls to themekey_format_rule_as_string()
- themekey_admin_delete_rule_confirm in ./
themekey_admin.inc - Menu callback -- ask for confirmation of ThemeKey rule deletion
- themekey_match_rule_childs in ./
themekey_base.inc - Helper function of
File
- ./
themekey_base.inc, line 509 - The functions in this file are the back end of ThemeKey.
Code
function themekey_format_rule_as_string($themekey_property_id) {
// fallback title
$title = $themekey_property_id;
$item = themekey_rule_get($themekey_property_id);
if (!empty($item)) {
$properties = variable_get('themekey_properties', array());
if (!in_array($item['property'], $properties)) {
$item['wildcard'] = $item['property'];
$item['property'] = 'drupal:path:wildcard';
}
$title = '"' . $item['property'] . ' ';
if (!empty($item['wildcard'])) {
$title .= $item['wildcard'] . ' ';
}
$title .= $item['operator'] . ' ' . $item['value'] . ' >>> ' . $item['theme'] . '"';
}
return $title;
}