Skip to:
Content

bbPress.org


Ignore:
Timestamp:
10/16/2006 06:26:02 PM (20 years ago)
Author:
mdawaffe
Message:

RTL support props Sewar. Fixes #440

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bb-includes/template-functions.php

    r480 r482  
    1010}
    1111
    12 function bb_stylesheet_uri() {
     12function language_attributes() {
     13    $output = '';
     14    if ( $dir = bb_get_option('text_direction') )
     15        $output = "dir=\"$dir\"";
     16    if ( $lang = bb_get_option('language') ) {
     17        if ( $dir ) $output .= ' ';
     18        $output .= "lang=\"$lang\" xml:lang=\"$lang\"";
     19    }
     20
     21    echo $output;
     22}
     23
     24function bb_stylesheet_uri( $stylesheet = '' ) {
     25    echo bb_get_stylesheet_uri( $stylesheet );
     26}
     27
     28function bb_get_stylesheet_uri( $stylesheet = '' ) {
     29    if ( 'rtl' == $stylesheet )
     30        $css_file = 'style-rtl.css';
     31    else
     32        $css_file = 'style.css';
     33
    1334    if ( file_exists( BBPATH . 'my-templates/style.css') )
    14         echo bb_get_option('uri') . 'my-templates/style.css';
    15     else
    16         echo bb_get_option('uri') . 'bb-templates/style.css';
     35        $r = bb_get_option('uri') . 'my-templates/' . $css_file;
     36    else
     37        $r = bb_get_option('uri') . 'bb-templates/' . $css_file;
     38    return apply_filters( 'bb_get_stylesheet_uri', $r, $stylesheet );
    1739}
    1840
Note: See TracChangeset for help on using the changeset viewer.