You are here

function _content_admin_display_contexts in Content Construction Kit (CCK) 6

Same name and namespace in other branches
  1. 5 content_admin.inc \_content_admin_display_contexts()

Array of possible display contexts for fields.

4 calls to _content_admin_display_contexts()
content_admin_display_overview_form in includes/content.admin.inc
Menu callback; presents a listing of fields display settings for a content type.
content_instance_default_values in includes/content.crud.inc
Create an array of default values for a field instance.
fieldgroup_edit_group_form in modules/fieldgroup/fieldgroup.module
theme_content_admin_display_overview_form in includes/content.admin.inc
Theme the display overview table.

File

./content.module, line 1570
Allows administrators to associate custom fields to content types.

Code

function _content_admin_display_contexts($selector = CONTENT_CONTEXTS_ALL) {
  $contexts = array();
  if ($selector == CONTENT_CONTEXTS_ALL || $selector == CONTENT_CONTEXTS_SIMPLE) {
    $contexts['teaser'] = t('Teaser');
    $contexts['full'] = t('Full node');
  }
  if ($selector == CONTENT_CONTEXTS_ALL || $selector == CONTENT_CONTEXTS_ADVANCED) {
    $contexts[NODE_BUILD_RSS] = t('RSS Item');
    if (module_exists('search')) {
      $contexts[NODE_BUILD_SEARCH_INDEX] = t('Search Index');
      $contexts[NODE_BUILD_SEARCH_RESULT] = t('Search Result');
    }
  }
  return $contexts;
}