Commit 72d428cb authored by Dries's avatar Dries

- Patch #1027630 by jhodgdon: unclear documentation for 'custom' and 'locked'...

- Patch #1027630 by jhodgdon: unclear documentation for 'custom' and 'locked' attributes for content type.
parent c24596a5
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment