uid) {
$properties = variable_get('themekey_properties', array());
$message = t('These are the current values of all available ThemeKey Properties. By clicking the value you can start creating a corresponding Theme Switching Rule.') . '
';
$parameters = themekey_get_global_parameters();
foreach ($properties as $property) {
if (!isset($parameters[$property])) {
themekey_property_value($parameters, $property);
}
$value = '';
if (is_null($parameters[$property])) {
if ('drupal:path' == $property) {
$value = 'no debug information';
}
else {
$value = 'empty';
}
}
else {
$values = is_array($parameters[$property]) ? $parameters[$property] : array($parameters[$property]);
$links = array();
foreach ($values as $single_value) {
$links[] = l($single_value, 'admin/settings/themekey', array('fragment' => 'themekey_new_rule', 'query' => array('property' => $property, 'value' => $single_value)));
}
$value = implode('
', $links);
}
$message .= '- ' . $property . '
' . $value . '
';
}
$message .= '
';
themekey_set_debug_message($message, array(), FALSE);
}
}
/**
* Implements hook_menu().
*/
function themekey_debug_menu() {
$items = array();
$items['admin/settings/themekey/settings/debug'] = array(
'title' => 'Debug',
'access callback' => 'user_access',
'access arguments' => array('administer themekey settings'),
'file' => 'themekey_debug_admin.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array('themekey_debug_settings_form'),
'type' => MENU_LOCAL_TASK,
'weight' => 10
);
return $items;
}