summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2011-01-18 18:52:31 +0000
committerDries Buytaert <dries@buytaert.net>2011-01-18 18:52:31 +0000
commit72d428cb8c7570ee7451a190a484bd35a5d54590 (patch)
tree88c0e649d4c584b232e644430cbabd03f406859d /modules
parentc24596a5bee7c834215f56b2886457951df664fe (diff)
downloadbrdo-72d428cb8c7570ee7451a190a484bd35a5d54590.tar.gz
brdo-72d428cb8c7570ee7451a190a484bd35a5d54590.tar.bz2
- Patch #1027630 by jhodgdon: unclear documentation for 'custom' and 'locked' attributes for content type.
Diffstat (limited to 'modules')
-rw-r--r--modules/node/node.module15
1 files changed, 9 insertions, 6 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index 399fa7ea3..d7d8447a1 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -754,17 +754,20 @@ function node_type_cache_reset() {
}
/**
- * Set the default values for a node type.
+ * Sets the default values for a node type.
*
- * The defaults are for a type defined through hook_node_info().
- * When populating a custom node type $info should have the 'custom'
- * key set to 1.
+ * The defaults are appropriate for a type defined through hook_node_info(),
+ * since 'custom' is TRUE for types defined in the user interface, and FALSE
+ * for types defined by modules. (The 'custom' flag prevents types from being
+ * deleted through the user interface.) Also, the default for 'locked' is TRUE,
+ * which prevents users from changing the machine name of the type.
*
* @param $info
- * An object or array containing values to override the defaults.
+ * An object or array containing values to override the defaults. See
+ * hook_node_info() for details on what the array elements mean.
*
* @return
- * A node type object.
+ * A node type object, with missing values in $info set to their defaults.
*/
function node_type_set_defaults($info = array()) {
$info = (array) $info;