You are here

function views_content_views_panes_content_type_admin_title in Chaos Tool Suite (ctools) 7

Same name and namespace in other branches
  1. 6 views_content/plugins/content_types/views_panes.inc \views_content_views_panes_content_type_admin_title()

Returns the administrative title for a type.

File

views_content/plugins/content_types/views_panes.inc, line 586
Content type plugin to allow Views to be exposed as a display type, leaving most of the configuration on the view.

Code

function views_content_views_panes_content_type_admin_title($subtype, $conf, $contexts) {
  list($name, $display) = explode('-', $subtype);
  $view = views_get_view($name);
  if (empty($view) || empty($view->display[$display])) {
    return t('Deleted/missing view @view', array(
      '@view' => $name,
    ));
  }
  $view
    ->set_display($display);
  views_content_views_panes_add_defaults($conf, $view);
  $title = views_content_get_display_title($view, $display);
  return check_plain($title);
}