You are here

function ctools_block_content_type_admin_title in Chaos Tool Suite (ctools) 7

Same name and namespace in other branches
  1. 6 plugins/content_types/block/block.inc \ctools_block_content_type_admin_title()

Returns the administrative title for a type.

File

plugins/content_types/block/block.inc, line 214
Provide Drupal blocks as content.

Code

function ctools_block_content_type_admin_title($subtype, $conf) {
  list($module, $delta) = _ctools_block_get_module_delta($subtype, $conf);
  $block = module_invoke($module, 'block_info');
  if (empty($block) || empty($block[$delta])) {
    return t('Deleted/missing block @module-@delta', array(
      '@module' => $module,
      '@delta' => $delta,
    ));
  }

  // The block description reported by hook_block() is plain text, but the title
  // reported by this hook should be HTML.
  $title = check_plain($block[$delta]['info']);
  return $title;
}