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.php24
1 files changed, 15 insertions, 9 deletions
diff --git a/modules/node/node.api.php b/modules/node/node.api.php
index 5c41e1f76..a9881d5ee 100644
--- a/modules/node/node.api.php
+++ b/modules/node/node.api.php
@@ -570,8 +570,12 @@ function hook_node_load($nodes, $types) {
* block access, return NODE_ACCESS_IGNORE or simply return nothing.
* Blindly returning FALSE will break other node access modules.
*
+ * Also note that this function isn't called for node listings (e.g., RSS feeds,
+ * the default home page at path 'node', a recent content block, etc.) See
+ * @link node_access Node access rights @endlink for a full explanation.
+ *
* @param $node
- * Either a node object or a (machine-readable) content type on which to
+ * Either a node object or the machine name of the content type on which to
* perform the access check.
* @param $op
* The operation to be performed. Possible values:
@@ -583,9 +587,9 @@ function hook_node_load($nodes, $types) {
* The user object to perform the access check operation on.
*
* @return
- * NODE_ACCESS_ALLOW if the operation is to be allowed;
- * NODE_ACCESS_DENY if the operation is to be denied;
- * NODE_ACCESS_IGNORE to not affect this operation at all.
+ * - NODE_ACCESS_ALLOW: if the operation is to be allowed.
+ * - NODE_ACCESS_DENY: if the operation is to be denied.
+ * - NODE_ACCESS_IGNORE: to not affect this operation at all.
*
* @ingroup node_access
*/
@@ -972,6 +976,7 @@ function hook_ranking() {
* The node type object that is being created.
*/
function hook_node_type_insert($info) {
+ drupal_set_message(t('You have just created a content type with a machine name %type.', array('%type' => $info->type)));
}
/**
@@ -1229,9 +1234,12 @@ function hook_validate($node, $form, &$form_state) {
/**
* Display a node.
*
- * This is a hook used by node modules. It allows a module to define a
- * custom method of displaying its nodes, usually by displaying extra
- * information particular to that node type.
+ * This hook is invoked only on the module that defines the node's content type
+ * (use hook_node_view() to act on all node views).
+ *
+ * This hook is invoked during node viewing after the node is fully loaded,
+ * so that the node type module can define a custom method for display, or
+ * add to the default display.
*
* @param $node
* The node to be displayed, as returned by node_load().
@@ -1249,8 +1257,6 @@ function hook_validate($node, $form, &$form_state) {
* view of the node, you might consider implementing one of these hooks
* instead.
*
- * For a detailed usage example, see node_example.module.
- *
* @ingroup node_api_hooks
*/
function hook_view($node, $view_mode) {