bb_language_attributes

The BuddyPress bb language attributes function.

Description

bb_language_attributes( (int) $xhtml = 0 ); 

Parameters (1)

0. $xhtml — Optional. (int)
The xhtml.

Usage

  1. if ( !function_exists( 'bb_language_attributes' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/functions.bb-template.php'; 
  3.  
  4. // The xhtml. 
  5. $xhtml = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bb_language_attributes($xhtml); 
  9.  

Defined (1)

The function is defined in the following location(s).

/bp-forums/bbpress/bb-includes/functions.bb-template.php  
  1. function bb_language_attributes( $xhtml = 0 ) 
  2. $output = ''; 
  3. if ( $dir = bb_get_option( 'text_direction' ) ) { 
  4. $output = 'dir="' . $dir . '" '; 
  5. if ( $lang = bb_get_option( 'language' ) ) { 
  6. $output .= 'xml:lang="' . $lang . '" '; 
  7. if ( $xhtml < '1.1' ) { 
  8. $output .= 'lang="' . $lang . '"'; 
  9.  
  10. echo ' ' . rtrim( $output );