Version 1
[yaffs-website] / vendor / drush / drush / tests / resources / create_node_types.php
1 <?php
2
3 $types = array(
4     array(
5       'type' => 'page',
6       'name' => 'Basic page',
7       'base' => 'node_content',
8       'description' => 'Use <em>basic pages</em> for your static content, such as an \'About us\' page.',
9       'custom' => 1,
10       'modified' => 1,
11       'locked' => 0,
12     ),
13     array(
14       'type' => 'article',
15       'name' => 'Article',
16       'base' => 'node_content',
17       'description' => 'Use <em>articles</em> for time-sensitive content like news, press releases or blog posts.',
18       'custom' => 1,
19       'modified' => 1,
20       'locked' => 0,
21     ),
22 );
23
24 foreach ($types as $type) {
25   $type = node_type_set_defaults($type);
26   node_type_save($type);
27   node_add_body_field($type);
28 }