Révision c304a780
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/ctools/plugins/content_types/term_context/term_name.inc | ||
---|---|---|
1 | 1 |
<?php |
2 | 2 |
|
3 | 3 |
/** |
4 |
* @file |
|
4 | 5 |
* Plugins are described by creating a $plugin array which will be used |
5 | 6 |
* by the system that includes this file. |
6 | 7 |
*/ |
8 |
|
|
7 | 9 |
$plugin = array( |
8 | 10 |
'single' => TRUE, |
9 | 11 |
'title' => t('Term name'), |
... | ... | |
19 | 21 |
), |
20 | 22 |
); |
21 | 23 |
|
22 |
|
|
23 | 24 |
/** |
24 | 25 |
* Render the custom content type. |
25 | 26 |
*/ |
... | ... | |
34 | 35 |
// Load the vocabulary. |
35 | 36 |
$vocab = taxonomy_vocabulary_load($term->vid); |
36 | 37 |
|
37 |
// Generate the title |
|
38 |
// Generate the title.
|
|
38 | 39 |
$content = !empty($conf['link']) ? l($term->name, 'taxonomy/term/' . $term->tid) : check_plain($term->name); |
39 | 40 |
|
40 |
// Build any surrounding markup if so configured |
|
41 |
// Build any surrounding markup if so configured.
|
|
41 | 42 |
if (isset($conf['markup']) && $conf['markup'] != 'none') { |
42 | 43 |
$markup = '<' . $conf['markup']; |
43 | 44 |
if (!empty($conf['id'])) { |
... | ... | |
51 | 52 |
} |
52 | 53 |
|
53 | 54 |
// Build the content type block. |
54 |
$block = new stdClass(); |
|
55 |
$block = new stdClass();
|
|
55 | 56 |
$block->module = 'term_name'; |
56 | 57 |
$block->title = t('Name'); |
57 | 58 |
$block->content = $content; |
Formats disponibles : Unified diff
Weekly update of contrib modules