Index: plugins/content_types/block/block.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ctools/plugins/content_types/block/block.inc,v
retrieving revision 1.9.2.3
diff -u -9 -p -r1.9.2.3 block.inc
--- plugins/content_types/block/block.inc	2 Feb 2010 21:49:21 -0000	1.9.2.3
+++ plugins/content_types/block/block.inc	4 May 2010 15:20:49 -0000
@@ -13,58 +13,78 @@
 
 /**
  * Plugins are described by creating a $plugin array which will be used
  * by the system that includes this file.
  */
 $plugin = array(
   // And this is just the administrative title.
   // All our callbacks are named according to the standard pattern and can be deduced.
   'title' => t('Block'),
+  'content type' => 'ctools_block_content_type_content_type',
 );
 
 /**
+ * Return the block content types with the specified $subtype_id.
+ */
+function ctools_block_content_type_content_type($subtype_id) {
+  list($module, $delta) = explode('-', $subtype_id, 2);
+  $module_blocks = module_invoke($module, 'block', 'list');
+  if (isset($module_blocks[$delta])) {
+    return _ctools_block_content_type_content_type($module, $delta, $module_blocks[$delta]);
+  }
+}
+
+/**
  * Return all block content types available.
  *
  * Modules wanting to make special adjustments the way that CTools handles their blocks
  * can implement an extension to the hook_block() family, where the function name is
  * of the form "$module . '_ctools_block_info'".
  */
 function ctools_block_content_type_content_types() {
   $types = array();
   foreach (module_list() as $module) {
     $module_blocks = module_invoke($module, 'block', 'list');
     if ($module_blocks) {
       foreach ($module_blocks as $delta => $block) {
-        // strip_tags used because it goes through check_plain and that
-        // just looks bad.
-        $info = array(
-          'title' => strip_tags($block['info']),
-        );
-
-        // Ask around for further information by invoking the hook_block() extension.
-        $function = $module . '_ctools_block_info';
-        if (!function_exists($function)) {
-          $function = 'ctools_default_block_info';
-        }
-        $function($module, $delta, $info);
-
+        $info = _ctools_block_content_type_content_type($module, $delta, $block);
         // this check means modules can remove their blocks; particularly useful
         // if they offer the block some other way (like we do for views)
         if ($info) {
           $types["$module-$delta"] = $info;
         }
       }
     }
   }
   return $types;
 }
 
 /**
+ * Return an info array for a specific block.
+ */
+function _ctools_block_content_type_content_type($module, $delta, $block) {
+  // strip_tags used because it goes through check_plain and that
+  // just looks bad.
+  $info = array(
+    'title' => strip_tags($block['info']),
+  );
+
+  // Ask around for further information by invoking the hook_block() extension.
+  $function = $module . '_ctools_block_info';
+  if (!function_exists($function)) {
+    $function = 'ctools_default_block_info';
+  }
+  $function($module, $delta, $info);
+
+  return $info;
+}
+
+/**
  * Output function for the 'block' content type. Outputs a block
  * based on the module and delta supplied in the configuration.
  */
 function ctools_block_content_type_render($subtype, $conf) {
   list($module, $delta) = _ctools_block_get_module_delta($subtype, $conf);
   $block = (object) module_invoke($module, 'block', 'view', $delta);
 
   if (empty($block)) {
     return;
