-
Notifications
You must be signed in to change notification settings - Fork 8
/
metatag.theme.inc
91 lines (85 loc) · 1.93 KB
/
metatag.theme.inc
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
/**
* @file
* Theme callbacks for the metatag module.
*/
/**
* Theme callback for a normal meta tag.
*
* The format is:
* <meta name="[name]" content="[value]" />
*/
function theme_metatag($variables) {
$element = &$variables['element'];
$args = array(
'#name' => 'name',
'#value' => 'content',
);
element_set_attributes($element, $args);
unset($element['#value']);
return theme('html_tag', $variables);
}
/**
* Theme callback for a normal meta tag.
*
* The format is:
* <meta http-equiv="[name]" content="[value]" />
*/
function theme_metatag_http_equiv($variables) {
$element = &$variables['element'];
$args = array(
'#name' => 'http-equiv',
'#value' => 'content',
);
element_set_attributes($element, $args);
unset($element['#value']);
return theme('html_tag', $variables);
}
/**
* Theme callback for a rel link tag.
*
* The format is:
* <link rel="[name]" href="[value]" />
*/
function theme_metatag_link_rel($variables) {
$element = &$variables['element'];
$args = array(
'#name' => 'rel',
'#value' => 'href',
);
element_set_attributes($element, $args);
unset($element['#value']);
return theme('html_tag', $variables);
}
/**
* Theme callback for a rev link tag.
*
* The format is:
* <link rev="[name]" href="[value]" />
*/
function theme_metatag_link_rev($variables) {
$element = &$variables['element'];
$args = array(
'#name' => 'rev',
'#value' => 'href',
);
element_set_attributes($element, $args);
unset($element['#value']);
return theme('html_tag', $variables);
}
/**
* Theme callback for a proprty meta tag.
*
* The format is:
* <meta property="[name]" content="[value]" />
*/
function theme_metatag_property($variables) {
$element = &$variables['element'];
$args = array(
'#name' => 'property',
'#value' => 'content',
);
element_set_attributes($element, $args);
unset($element['#value']);
return theme('html_tag', $variables);
}