function hook_content_register_content_type

6.x content.api.php hook_content_register_content_type()
4.x content.module hook_content_register_content_type()
5.x content.module hook_content_register_content_type()

Sample hook other modules implement to register a content type.

Simply return an array as illustrated below to register your module's content types.

IMPORTNAT: The type's machine name must be a valid variable name. No spaces or strange symbols.

3 functions implement hook_content_register_content_type()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

announcements_content_register_content_type in modules/announcements/announcements.module
Implementatin of content's hook_content_register_content_type
blocks_content_register_content_type in modules/blocks/blocks.module
Implementatin of content's hook_content_register_content_type
content_content_register_content_type in modules/content/content.module
Implementation of this module's hook_content_register_content_type.

File

modules/content/content.module, line 645

Code

function hook_content_register_content_type() {
  $arr = array(
    "type_1" => array(
      "title" => t("Type One"),
      "description" => t("This is a content type."),
      "settings" => array(),
    ),
    "type_2" => array(
      "title" => t("Type Two"),
      "description" => t("This is another content type."),
      "settings" => array(),
    ),

  );

  return $arr;
}