WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#7848 closed enhancement (worksforme)

Themes should be able to detect directionality of layout

Reported by: huji Owned by: anonymous
Priority: normal Milestone:
Component: Template Version:
Severity: normal Keywords:
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)

comment:1 Viper007Bond5 years ago

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

comment:2 huji5 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") )

comment:3 darkdragon5 years ago

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