Same name and namespace in other branches
  1. 4.7.x modules/node.module \node_prepare()
  2. 5.x modules/node/node.module \node_prepare()
  3. 6.x modules/node/node.module \node_prepare()

Apply filters to a node in preparation for theming.

5 calls to node_prepare()
blog_view in modules/blog.module
Implementation of hook_view().
book_content in modules/book.module
forum_view in modules/forum.module
Implementation of hook_view().
hook_view in developer/hooks/node.php
Display a node.
node_example_view in developer/examples/node_example.module
Implementation of hook_view().

File

modules/node.module, line 515
The core that allows content to be submitted to the site.

Code

function node_prepare($node, $teaser = FALSE) {
  $node->readmore = strlen($node->teaser) < strlen($node->body);
  if ($teaser == FALSE) {
    $node->body = check_output($node->body, $node->format);
  }
  else {
    $node->teaser = check_output($node->teaser, $node->format);
  }
  return $node;
}