function get_page_language($language) { if (get_drupal_version() >= 6) { return $language->language; } return $language; }
function get_artx_drupal_view() { if (get_drupal_version() == 7) { return new artx_view_drupal7(); } return new artx_view_drupal56(); }
function get_html_link_output($link) { $output = ''; // Is the title HTML? $html = isset($link['html']) && $link['html']; // Initialize fragment and query variables. $link['query'] = isset($link['query']) ? $link['query'] : NULL; $link['fragment'] = isset($link['fragment']) ? $link['fragment'] : NULL; if (isset($link['href'])) { if (get_drupal_version() == 5) { $output = l($link['title'], $link['href'], $link['attributes'], $link['query'], $link['fragment'], FALSE, $html); } else { $output = l($link['title'], $link['href'], array('language' => $link['language'], 'attributes' => $link['attributes'], 'query' => $link['query'], 'fragment' => $link['fragment'], 'absolute' => FALSE, 'html' => $html)); } } else { if ($link['title']) { if (!$html) { $link['title'] = check_plain($link['title']); } $output = $link['title']; } } return $output; }