Commit 7ef099f5 authored by Dries's avatar Dries
Browse files

- Patch #1189834 by aspilicious, chrispomeroy: convert book-export-html.tpl.php to HTML5.

parent 09e2fb03
......@@ -18,8 +18,8 @@
* @ingroup themeable
*/
?>
<!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" lang="<?php print $language->langcode; ?>" xml:lang="<?php print $language->langcode; ?>">
<!DOCTYPE html >
<html<?php print $html_attributes; ?>>
<head>
<title><?php print $title; ?></title>
<?php print $head; ?>
......
......@@ -1208,7 +1208,7 @@ function book_toc($bid, $depth_limit, $exclude = array()) {
}
/**
* Processes variables for book-export-html.tpl.php.
* Preprocesses variables for book-export-html.tpl.php.
*
* The $variables array contains the following elements:
* - title
......@@ -1225,6 +1225,20 @@ function template_preprocess_book_export_html(&$variables) {
$variables['language'] = $language;
$variables['language_rtl'] = ($language->direction == LANGUAGE_RTL);
$variables['head'] = drupal_get_html_head();
// HTML element attributes.
$variables['html_attributes_array']['lang'] = $language->langcode;
$variables['html_attributes_array']['dir'] = $language->direction ? 'rtl' : 'ltr';
}
/**
* Processes variables for book-export-html.tpl.php.
*
* @see book-export-html.tpl.php
*/
function template_process_book_export_html(&$variables) {
// Flatten out html_attributes
$variables['html_attributes'] = drupal_attributes($variables['html_attributes_array']);
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment