node_prepare
modules/node/node.module, строка 1028
- Версии
- 5 – 6
node_prepare($node, $teaser = FALSE)
Применяет фильтры и создает стандартные элементы нод.
Код
<?php
function node_prepare($node, $teaser = FALSE) {
// First we'll overwrite the existing node teaser and body with
// the filtered copies! Then, we'll stick those into the content
// array and set the read more flag if appropriate.
$node->readmore = $node->teaser != $node->body;
if ($teaser == FALSE) {
$node->body = check_markup($node->body, $node->format, FALSE);
}
else {
$node->teaser = check_markup($node->teaser, $node->format, FALSE);
}
$node->content['body'] = array(
'#value' => $teaser ? $node->teaser : $node->body,
'#weight' => 0,
);
return $node;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии