function content_types in Content Construction Kit (CCK) 6
Same name and namespace in other branches
- 5 content.module \content_types()
- 6.3 content.module \content_types()
- 6.2 content.module \content_types()
Return a list of all content types.
Parameters
$content_type_name: If set, return information on just this type.
34 calls to content_types()
- content_add_more_js in includes/
content.node_form.inc - Menu callback for AHAH addition of new empty widgets.
- content_admin_display_overview_form in includes/
content.admin.inc - Menu callback; presents a listing of fields display settings for a content type.
- content_admin_field_overview_form in includes/
content.admin.inc - Menu callback; listing of fields for a content type.
- content_copy_export in modules/
content_copy/ content_copy.module - Process the export, get field admin forms for all requested fields and save the form values as formatted text.
- content_copy_import_form_submit in modules/
content_copy/ content_copy.module - Submit handler for import form. For each submitted field: 1) add new field to the database 2) execute the imported field macro to update the settings to the imported values
1 string reference to 'content_types'
- content_copy_export in modules/
content_copy/ content_copy.module - Process the export, get field admin forms for all requested fields and save the form values as formatted text.
File
- ./
content.module, line 1158 - Allows administrators to associate custom fields to content types.
Code
function content_types($type_name = NULL) {
// handle type name with either an underscore or a dash
$type_name = !empty($type_name) ? str_replace('-', '_', $type_name) : NULL;
$info = _content_type_info();
if (isset($info['content types'])) {
if (!isset($type_name)) {
return $info['content types'];
}
if (isset($info['content types'][$type_name])) {
return $info['content types'][$type_name];
}
}
}