You are here

function skinr_ui_get_element_title in Skinr 7.2

Same name and namespace in other branches
  1. 8.2 skinr_ui/skinr_ui.admin.inc \skinr_ui_get_element_title()
4 calls to skinr_ui_get_element_title()
skinr_context_ui_admin_list_subform in skinr_context/skinr_context_ui.admin.inc
Overrides skinr_ui_admin_skins().
skinr_context_ui_filters in skinr_context/skinr_context_ui.admin.inc
List skinr administration filters that can be applied.
skinr_ui_admin_skins in ./skinr_ui.admin.inc
Form builder: Builds the skin configuration administration overview.
skinr_ui_filters in ./skinr_ui.admin.inc
List skinr administration filters that can be applied.

File

./skinr_ui.admin.inc, line 1294
Admin page callbacks for the Skinr UI module.

Code

function skinr_ui_get_element_title($module, $element, $theme = NULL) {
  static $current_theme;
  static $themes;
  if (empty($theme)) {
    if (!isset($current_theme)) {
      $current_theme = skinr_current_theme(TRUE);
    }
    $theme = $current_theme;
  }
  $title = skinr_invoke_all('skinr_ui_element_title', $module, $element, $theme);
  $title = reset($title);
  if (!$title) {
    if (!isset($themes)) {
      $themes = list_themes();
    }
    foreach ($themes as $t) {
      if (!empty($t->info['hidden'])) {
        continue;
      }
      if ($t->name == $theme) {

        // Already tried this one.
        continue;
      }
      if ($title = skinr_invoke_all('skinr_ui_element_title', $module, $element, $t->name)) {
        $title = reset($title);
        break;
      }
    }
  }
  return $title;
}