You are here

function node_prepare in Drupal 4

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

Apply filters to a node in preparation for theming.

8 calls to node_prepare()
blog_view in modules/blog.module
Implementation of hook_view().
book_content in modules/book.module
Returns the content of a given node. If $teaser if true, returns the teaser rather than full content. Displays the most recently approved revision of a node (if any) unless we have to display this page in the context of the moderation queue.
book_view in modules/book.module
Implementation of hook_view().
forum_view in modules/forum.module
Implementation of hook_view().
node_feed in modules/node.module
A generic function for generating RSS feeds from a set of nodes.

... See full list

File

modules/node.module, line 568
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_markup($node->body, $node->format, FALSE);
  }
  else {
    $node->teaser = check_markup($node->teaser, $node->format, FALSE);
  }
  return $node;
}