Make WordPress Core

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#7848 closed enhancement (worksforme)

Themes should be able to detect directionality of layout

Reported by: huji's profile huji Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Template Keywords:
Focuses: Cc:

Description

It would be a great idea if themes could detect the directionality of the layout based on content language. This way, a theme could check if the blog is in an RTL langauge (Hebrew, Arabic, Persian, etc); if it is, other CSS and image files could be loaded.

Change History (3)

#1 @Viper007Bond
17 years ago

Won't <?php bloginfo('text_direction'); ?> work?

#2 @huji
17 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

My bad! Actually, this is not only available, but also in use. In theme.php (HEAD version) we have:

elseif ( !empty($wp_locale->text_direction) && file_exists("$dir/{$wp_locale->text_direction}.css") )

#3 @darkdragon
17 years ago

  • Milestone 2.8 deleted
Note: See TracTickets for help on using tickets.