You are here

function panels_mini_panels_mini_content_type_admin_title in Panels 7.3

Same name and namespace in other branches
  1. 6.3 panels_mini/plugins/content_types/panels_mini.inc \panels_mini_panels_mini_content_type_admin_title()

Provide the administrative title of a mini panel.

File

panels_mini/plugins/content_types/panels_mini.inc, line 141
Contains the content type plugin for a mini panel. While this does not need to be broken out into a .inc file, it's convenient that we do so that we don't load code unnecessarily. Plus it demonstrates plugins in modules other than Panels itself.

Code

function panels_mini_panels_mini_content_type_admin_title($subtype, $conf) {
  $mini = panels_mini_load($subtype);
  if (!$mini) {
    return t('Deleted/missing mini panel @name', array(
      '@name' => $subtype,
    ));
  }
  $title = filter_xss_admin($mini->admin_title);
  if (empty($title)) {
    $title = t('Untitled mini panel');
  }
  return $title;
}