Révision c304a780
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/ctools/plugins/content_types/node_context/node_created.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 created date'), |
... | ... | |
20 | 22 |
* Render the custom content type. |
21 | 23 |
*/ |
22 | 24 |
function ctools_node_created_content_type_render($subtype, $conf, $panel_args, $context) { |
23 |
if (!empty($context) && ( empty($context->data) || empty($context->data->nid)) ){
|
|
25 |
if (!empty($context) && (empty($context->data) || empty($context->data->nid))) {
|
|
24 | 26 |
return; |
25 | 27 |
} |
26 | 28 |
|
... | ... | |
28 | 30 |
$node = $context->data; |
29 | 31 |
|
30 | 32 |
// Build the content type block. |
31 |
$block = new stdClass(); |
|
33 |
$block = new stdClass();
|
|
32 | 34 |
$block->module = 'node_created'; |
33 | 35 |
$block->title = t('Created date'); |
34 | 36 |
$block->content = format_date($node->created, $conf['format']); |
Formats disponibles : Unified diff
Weekly update of contrib modules