Permalink
Browse files

Add "html_attributes" theme callback to allow modules to inject attri…

…butes into

the <html> element, including things like namespaces.   Fixes #1615.
  • Loading branch information...
1 parent 09a593c commit 08c41f2976cb49b85ec896b11735edb008d53881 @bharat bharat committed Jan 21, 2011
@@ -86,6 +86,7 @@ public function __call($function, $args) {
case "admin_page_top":
case "admin_head":
case "body_attributes":
+ case "html_attributes":
$blocks = array();
foreach (module::active() as $module) {
$helper_class = "{$module->name}_theme";
@@ -224,6 +224,7 @@ public function __call($function, $args) {
case "head":
case "header_bottom":
case "header_top":
+ case "html_attributes":
case "page_bottom":
case "page_top":
case "photo_blocks":
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<html xmlns="http://www.w3.org/1999/xhtml" <?= $theme->html_attributes() ?> xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<? $theme->start_combining("script,css") ?>
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<html xmlns="http://www.w3.org/1999/xhtml" <?= $theme->html_attributes() ?> xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<? $theme->start_combining("script,css") ?>

0 comments on commit 08c41f2

Please sign in to comment.