Closed (fixed)
Project:
Install Profile API (obsolete)
Version:
5.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
31 Mar 2007 at 08:40 UTC
Updated:
23 Apr 2007 at 16:32 UTC
$types = array(
array(
'type' => 'page',
'name' => st('Page'),
'module' => 'node',
'description' => st('If you want to add a static page, like a contact page or an about page, use a page.'),
'custom' => TRUE,
'modified' => TRUE,
'locked' => FALSE,
),
foreach ($types as $type) {
$type = (object) _node_type_set_defaults($type);
node_type_save($type);
}
Is this worth it or is the array with foreach loop already simple enough? Probably low priority, it's nice being able to read the content types....
Comments
Comment #1
boris mann commentedDoesn't make sense to do anything with the array, I don't think. Committed a small function to do the object casting and saving.
Comment #2
(not verified) commented