summaryrefslogtreecommitdiff
path: root/modules/node/node.api.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/node/node.api.php')
-rw-r--r--modules/node/node.api.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/modules/node/node.api.php b/modules/node/node.api.php
index 3e8029cfc..90ffd8b7f 100644
--- a/modules/node/node.api.php
+++ b/modules/node/node.api.php
@@ -642,14 +642,20 @@ function hook_node_prepare($node) {
* @param $node
* The node being displayed in a search result.
*
- * @return
- * Extra information to be displayed with search result.
+ * @return array
+ * Extra information to be displayed with search result. This information
+ * should be presented as an associative array. It will be concatenated
+ * with the post information (last updated, author) in the default search
+ * result theming.
+ *
+ * @see template_preprocess_search_result()
+ * @see search-result.tpl.php
*
* @ingroup node_api_hooks
*/
function hook_node_search_result($node) {
$comments = db_query('SELECT comment_count FROM {node_comment_statistics} WHERE nid = :nid', array('nid' => $node->nid))->fetchField();
- return format_plural($comments, '1 comment', '@count comments');
+ return array('comment' => format_plural($comments, '1 comment', '@count comments'));
}
/**
@@ -758,7 +764,7 @@ function hook_node_validate($node, $form, &$form_state) {
* properties.
*
* @param $node
- * The node being updated in response to a form submission.
+ * The node object being updated in response to a form submission.
* @param $form
* The form being used to edit the node.
* @param $form_state