-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuserpoints.theme.inc
More file actions
42 lines (34 loc) · 1.02 KB
/
userpoints.theme.inc
File metadata and controls
42 lines (34 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/**
* @file
* Theme functions for userpoints.module
*/
/**
* Theme implementation to display a userpoints category.
*/
function theme_userpoints_view_category($variables) {
$element = $variables['element'];
$element += array(
'#attributes' => array(),
);
$output = '';
if (!empty($element['#title'])) {
$output .= '<h3 ' . drupal_attributes(($element['#attributes'])) . '>' . $element['#title'] . '</h3>';
}
$output .= '<dl ' . drupal_attributes(($element['#attributes'])) . '>';
$output .= drupal_render_children($element);
$output .= '</dl>';
return $output;
}
/**
* Theme implementation to display a userpoints item.
*/
function theme_userpoints_view_item($variables) {
$element = $variables['element'];
$element += array(
'#attributes' => array(),
);
$output = '<dt ' . drupal_attributes(($element['#attributes'])) . '>' . $element['#title'] . '</dt>';
$output .= '<dd ' . drupal_attributes(($element['#attributes'])) . '>' . $element['#value'] . '</dd>';
return $output;
}