From 72d428cb8c7570ee7451a190a484bd35a5d54590 Mon Sep 17 00:00:00 2001 From: Dries Buytaert <dries@buytaert.net> Date: Tue, 18 Jan 2011 18:52:31 +0000 Subject: [PATCH] - Patch #1027630 by jhodgdon: unclear documentation for 'custom' and 'locked' attributes for content type. --- modules/node/node.module | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/modules/node/node.module b/modules/node/node.module index 399fa7ea3c05..d7d8447a12fd 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; -- GitLab