diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-05-03 10:11:35 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-05-03 10:11:35 +0000 |
commit | a8c30ed91ea00e24f809adc965b05f8292fbc236 (patch) | |
tree | 386db65fe5377df5373bf3e2a2b30bf1112a5fc7 /modules/node/node.api.php | |
parent | 3d951475eaebab990a78d07acdc344eb50239e18 (diff) | |
download | brdo-a8c30ed91ea00e24f809adc965b05f8292fbc236.tar.gz brdo-a8c30ed91ea00e24f809adc965b05f8292fbc236.tar.bz2 |
- Patch #449718 by alienbrain: node_feed() is now using new node building API.
Diffstat (limited to 'modules/node/node.api.php')
-rw-r--r-- | modules/node/node.api.php | 39 |
1 files changed, 14 insertions, 25 deletions
diff --git a/modules/node/node.api.php b/modules/node/node.api.php index 65446cad9..39da26ea4 100644 --- a/modules/node/node.api.php +++ b/modules/node/node.api.php @@ -287,28 +287,6 @@ function hook_node_prepare_translation($node) { } /** - * An RSS feed is being generated. - * - * The module can return properties to be added to the RSS item generated for - * this node. This hook should only be used to add XML elements to the RSS - * feed item itself. See comment_node_rss_item() and upload_node_rss_item() - * for examples. - * - * @param $node - * The node the action is being performed on. - * @return - * Extra information to be added to the RSS item. - */ -function hook_node_rss_item($node) { - if ($node->comment != COMMENT_NODE_HIDDEN) { - return array(array('key' => 'comments', 'value' => url('node/' . $node->nid, array('fragment' => 'comments', 'absolute' => TRUE)))); - } - else { - return array(); - } -} - -/** * The node is being displayed as a search result. * * If you want to display extra information with the result, return it. @@ -401,9 +379,20 @@ function hook_node_validate($node, $form) { /** * The node content is being assembled before rendering. * - * The module may add elements $node->content prior to rendering. This hook - * will be called after hook_view(). The structure of $node->content is a renderable - * array as expected by drupal_render(). + * TODO D7 This needs work to clearly explain the different build modes. + * + * The module may add elements to $node->content prior to rendering. This hook + * will be called after hook_view(). The structure of $node->content is a + * renderable array as expected by drupal_render(). + * + * When $node->build_mode is NODE_BUILD_RSS modules can also add extra RSS + * elements and namespaces to $node->rss_elements and $node->rss_namespaces + * respectively for the RSS item generated for this node. For details on how + * this is used @see node_feed() + * + * @see taxonomy_node_view() + * @see upload_node_view() + * @see comment_node_view() * * @param $node * The node the action is being performed on. |