Révision c304a780
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/ctools/plugins/content_types/node_context/node_type_desc.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('Node type description'), |
... | ... | |
23 | 25 |
$block->module = 'node_type'; |
24 | 26 |
|
25 | 27 |
if ($node) { |
26 |
$type = node_type_get_type($node); |
|
27 |
$block->title = $type->name; |
|
28 |
$type = node_type_get_type($node);
|
|
29 |
$block->title = $type->name;
|
|
28 | 30 |
$block->content = filter_xss_admin($type->description); |
29 | 31 |
$block->delta = $node->type; |
30 | 32 |
} |
31 | 33 |
else { |
32 |
$block->title = t('Node type description'); |
|
34 |
$block->title = t('Node type description');
|
|
33 | 35 |
$block->content = t('Node type description goes here.'); |
34 | 36 |
$block->delta = 'unknown'; |
35 | 37 |
} |
... | ... | |
42 | 44 |
} |
43 | 45 |
|
44 | 46 |
function ctools_node_type_desc_content_type_edit_form($form, &$form_state) { |
45 |
// provide a blank form so we have a place to have context setting.
|
|
47 |
// Provide a blank form so we have a place to have context setting.
|
|
46 | 48 |
return $form; |
47 | 49 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules