drupal_get_content
includes/common.inc, строка 53
- Версии
- 5 – 6
drupal_get_content($region = NULL, $delimiter = ' ')
Get assigned content.
Параметры
$region
A specified region to fetch content for. If NULL
, all regions will be returned.
$delimiter
Content to be inserted between exploded array elements.
Код
<?php
function drupal_get_content($region = NULL, $delimiter = ' ') {
$content = drupal_set_content();
if (isset($region)) {
if (isset($content[$region]) && is_array($content[$region])) {
return implode($delimiter, $content[$region]);
}
}
else {
foreach (array_keys($content) as $region) {
if (is_array($content[$region])) {
$content[$region] = implode($delimiter, $content[$region]);
}
}
return $content;
}
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии