WordPress.org

Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#7848 closed enhancement (worksforme)

Themes should be able to detect directionality of layout

Reported by: huji Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Template Keywords:
Focuses: Cc:
PR Number:

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
11 years ago

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

#2 @huji
11 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
11 years ago

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