Just looking at the latest in the GitHub repo.
function template_html_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
// Show right to left and the character set for ease of translating.
echo '<!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"', $context['right_to_left'] ? ' dir="rtl"' : '', '>
<head>';
// load in any css from mods or themes so they can overwrite if wanted
template_css();
// Save some database hits, if a width for multiple wrappers is set in admin.
if (!empty($settings['forum_width']))
echo '
<style type="text/css">#wrapper, .frame {width: ', $settings['forum_width'], ';}</style>';
// Quick and dirty testing of RTL horrors. Remove before production build.
//echo '
//<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/rtl.css?alp21" />';
// load in any javascript files from mods and themes
template_javascript();
// RTL languages require an additional stylesheet.
if ($context['right_to_left'])
{
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/rtl.css?alp21" />';
if (!empty($context['theme_variant']))
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/rtl', $context['theme_variant'], '.css?alp21" />';
}
Is it necessary to load the js files that early? My understanding is that it's preferable to load js files just before the </body> tag, if possible.
The other point is that even if the js files stay loaded here, it would definitely be preferable to load the rtl.css files before the js. Loadiing css files after js files is bad practice (causes FOUC problems).