diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-10-29 10:30:15 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-10-29 10:30:15 -0200 |
commit | fb951546d0e88063b8bb4cfb986bd12bea33f58b (patch) | |
tree | 3b5277a8822bf3e6a4b566ed5ec9d705f4e3ed99 /template.php | |
parent | eac7d74c809f6297c953823222708d997f342b01 (diff) | |
download | nuvemdario-fb951546d0e88063b8bb4cfb986bd12bea33f58b.tar.gz nuvemdario-fb951546d0e88063b8bb4cfb986bd12bea33f58b.tar.bz2 |
Custom common methods
Diffstat (limited to 'template.php')
-rw-r--r-- | template.php | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/template.php b/template.php index 35c4f64..96cf2f6 100644 --- a/template.php +++ b/template.php @@ -3,7 +3,7 @@ require_once("common_methods.php"); -switch (get_drupal_version()) { +switch (nuvemdario_get_drupal_version()) { case 5: require_once("drupal5_theme_methods.php"); break; @@ -19,22 +19,20 @@ switch (get_drupal_version()) { /* Common methods */ -/* -function get_drupal_version() { +function nuvemdario_get_drupal_version() { $tok = strtok(VERSION, '.'); //return first part of version number return (int)$tok[0]; } -function get_page_language($language) { +function nuvemdario_get_page_language($language) { if (get_drupal_version() >= 6) return $language->language; return $language; } -function get_full_path_to_theme() { +function nuvemdario_get_full_path_to_theme() { return base_path().path_to_theme(); } -*/ function get_nuvemdario_drupal_view() { if (get_drupal_version() == 7) @@ -55,7 +53,7 @@ class nuvemdario_view_drupal56 { $$name = & $vars[$name]; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo get_page_language($language); ?>" xml:lang="<?php echo get_page_language($language); ?>" <?php if (isset($language->dir)) { echo 'dir="'.$language->dir.'"'; }?> > +<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo nuvemdario_get_page_language($language); ?>" xml:lang="<?php echo nuvemdario_get_page_language($language); ?>" <?php if (isset($language->dir)) { echo 'dir="'.$language->dir.'"'; }?> > <head> <?php echo $head; ?> <title><?php if (isset($head_title )) { echo $head_title; } ?></title> |