Index: includes/content.token.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/includes/content.token.inc,v
retrieving revision 1.5.2.2
diff -u -r1.5.2.2 content.token.inc
--- includes/content.token.inc	17 Sep 2008 20:31:59 -0000	1.5.2.2
+++ includes/content.token.inc	18 Sep 2008 13:19:09 -0000
@@ -1,6 +1,21 @@
 <?php
 // $Id: content.token.inc,v 1.5.2.2 2008/09/17 20:31:59 yched Exp $
 
+/**
+ * Implementation of hook_content_display_contexts
+ * (on behalf of token.module)
+ */
+function token_content_display_contexts() {
+  return array(
+    'token' => array(
+      'title' => t('Token'),
+      'contexts' => array(
+        'token' => t('Token'),
+      ),
+    ),
+  );
+}
+
 // Two helper functions that generate appropriate tokens for CCK-added fields.
 function content_token_values($type, $object = NULL) {
   $tokens = array();
Index: includes/content.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/includes/content.admin.inc,v
retrieving revision 1.181.2.40
diff -u -r1.181.2.40 content.admin.inc
--- includes/content.admin.inc	16 Sep 2008 14:51:40 -0000	1.181.2.40
+++ includes/content.admin.inc	18 Sep 2008 13:19:09 -0000
@@ -496,7 +496,7 @@
  * Form includes form widgets to select which fields appear for teaser, full node
  * and how the field labels should be rendered.
  */
-function content_display_overview_form(&$form_state, $type_name, $contexts_selector = CONTENT_CONTEXTS_SIMPLE) {
+function content_display_overview_form(&$form_state, $type_name, $contexts_selector = 'basic') {
   // Gather type information.
   $type = content_types($type_name);
   $field_types = _content_field_types();
@@ -542,7 +542,7 @@
     );
 
     // Label
-    if ($contexts_selector == CONTENT_CONTEXTS_SIMPLE) {
+    if ($contexts_selector == 'basic') {
       $form[$name]['label']['format'] = array(
         '#type' => 'select',
         '#options' => $label_options,
@@ -586,7 +586,7 @@
       'human_name' => array('#value' => check_plain($group['label'])),
       'weight' => array('#type' => 'value', '#value' => $weight),
     );
-    if ($contexts_selector == CONTENT_CONTEXTS_SIMPLE) {
+    if ($contexts_selector == 'basic') {
       $form[$name]['label'] = array(
         '#type' => 'select',
         '#options' => $label_options,
Index: theme/theme.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/theme/Attic/theme.inc,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 theme.inc
--- theme/theme.inc	12 Sep 2008 19:34:03 -0000	1.1.2.2
+++ theme/theme.inc	18 Sep 2008 13:19:09 -0000
@@ -128,7 +128,7 @@
   }
   $order = $dummy ? explode(' ', trim(drupal_render($dummy))) : array();
 
-  if ($contexts_selector == CONTENT_CONTEXTS_SIMPLE) {
+  if ($contexts_selector == 'basic') {
     $help = t("Configure how this content type's fields and field labels should be displayed when it's viewed in teaser and full-page mode.");
   }
   else {
@@ -142,7 +142,7 @@
     return;
   }
 
-  $vars['simple'] = $contexts_selector == CONTENT_CONTEXTS_SIMPLE;
+  $vars['simple'] = $contexts_selector == 'basic';
   $vars['contexts'] = _content_admin_display_contexts($contexts_selector);
 
   $rows = array();
Index: content.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/content.module,v
retrieving revision 1.301.2.56
diff -u -r1.301.2.56 content.module
--- content.module	17 Sep 2008 20:31:59 -0000	1.301.2.56
+++ content.module	18 Sep 2008 13:19:08 -0000
@@ -8,10 +8,6 @@
 define('CONTENT_DB_STORAGE_PER_FIELD', 0);
 define('CONTENT_DB_STORAGE_PER_CONTENT_TYPE', 1);
 
-define('CONTENT_CONTEXTS_SIMPLE', 0);
-define('CONTENT_CONTEXTS_ADVANCED', 1);
-define('CONTENT_CONTEXTS_ALL', 2);
-
 define('CONTENT_CALLBACK_NONE', 0x0001);
 define('CONTENT_CALLBACK_DEFAULT', 0x0002);
 define('CONTENT_CALLBACK_CUSTOM', 0x0004);
@@ -130,19 +126,16 @@
         'type' => MENU_LOCAL_TASK,
         'weight' => 2,
       );
-      $items['admin/content/node-type/'. $type_url_str .'/display/general'] = array(
-        'title' => 'General',
-        'page arguments' => array('content_display_overview_form', $type_name),
-        'type' => MENU_DEFAULT_LOCAL_TASK,
-        'weight' => 0,
-      );
-      $items['admin/content/node-type/'. $type_url_str .'/display/advanced'] = array(
-        'title' => 'Advanced',
-        'page arguments' => array('content_display_overview_form', $type_name, (string)CONTENT_CONTEXTS_ADVANCED),
-        'access arguments' => array('administer content types'),
-        'type' => MENU_LOCAL_TASK,
-        'weight' => 1,
-      );
+      $contexts = _content_get_display_contexts();
+      foreach ($contexts['menus'] as $key => $context_tab) {
+        $items['admin/content/node-type/'. $type_url_str .'/display/'. $key] = array(
+          'title' => $context_tab['title'],
+          'page arguments' => array('content_display_overview_form', $type_name, $key),
+          'access arguments' => array('administer content types'),
+          'type' => $key == 'basic' ? MENU_DEFAULT_LOCAL_TASK : MENU_LOCAL_TASK,
+          'weight' => $key == 'basic' ? 0 : 1,
+        );
+      }
       // Cast as an array in case this is called before any fields have
       // been added, like when a new content type is created.
       foreach ((array) $content_type['fields'] as $field) {
@@ -1690,19 +1683,27 @@
 /**
  * Array of possible display contexts for fields.
  */
-function _content_admin_display_contexts($selector = CONTENT_CONTEXTS_ALL) {
-  $contexts = array();
+function _content_admin_display_contexts($selector = NULL) {
+  $contexts = _content_get_display_contexts();
 
-  if ($selector == CONTENT_CONTEXTS_ALL || $selector == CONTENT_CONTEXTS_SIMPLE) {
-    $contexts['teaser'] = t('Teaser');
-    $contexts['full'] = t('Full node');
+  if (isset($selector) && isset($contexts['menus'][$selector])) {
+    return $contexts['menus'][$selector]['contexts'];
   }
 
-  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['flat'];
+}
+
+function _content_get_display_contexts() {
+  static $contexts;
+
+  if (!isset($contexts)) {
+    $contexts = array('menus' => array(), 'flat' => array());
+    foreach (module_implements('content_display_contexts') as $module) {
+      $additions = module_invoke($module, 'content_display_contexts');
+      $contexts['menus'] = array_merge($contexts['menus'], $additions);
+      foreach ($additions as $addition) {
+        $contexts['flat'] = array_merge($contexts['flat'], $addition['contexts']);
+      }
     }
   }
 
@@ -1710,6 +1711,39 @@
 }
 
 /**
+ * Implementations of hook_content_display_contexts
+ * on behalf of core modules.
+ */
+function node_content_display_contexts() {
+  return array(
+    'basic' => array(
+      'title' => t('Basic'),
+      'contexts' => array(
+        'teaser' => t('Teaser'),
+        'full' => t('Full node'),
+      ),
+    ),
+    'rss' => array(
+      'title' => t('RSS'),
+      'contexts' => array(
+        NODE_BUILD_RSS => t('RSS'),
+      ),
+    ),
+  );
+}
+function search_content_display_contexts() {
+  return array(
+    'search' => array(
+      'title' => t('Search'),
+      'contexts' => array(
+        NODE_BUILD_SEARCH_INDEX => t('Search Index'),
+        NODE_BUILD_SEARCH_RESULT => t('Search Result'),
+      ),
+    ),
+  );
+}
+
+/**
  * Generate a table name for a field or a content type.
  *
  * @param $name
