| 1 |
<?php
|
| 2 |
function phptemplate_stylesheet_import($stylesheet, $media = 'all') {
|
| 3 |
$rtl = in_array(locale_initialize(), array('ar', 'fa', 'he', 'ur'));
|
| 4 |
if (!$rtl) {
|
| 5 |
return theme_stylesheet_import($stylesheet, $media);
|
| 6 |
}
|
| 7 |
if ($stylesheet == base_path() . 'misc/drupal.css') {
|
| 8 |
$stylesheet = 'misc/drupal-rtl.css';
|
| 9 |
}
|
| 10 |
if ($stylesheet == base_path() . path_to_theme() . '/style.css') {
|
| 11 |
$stylesheet = base_path() . path_to_theme() . '/style-rtl.css';
|
| 12 |
}
|
| 13 |
return theme_stylesheet_import($stylesheet, $media);
|
| 14 |
}
|
| 15 |
|