language_attributes

Displays the language attributes for the html tag.

Description

language_attributes( (string) $doctype = 'html' ); 

Builds up a set of html attributes containing the text direction and language information for the page.

Parameters (1)

0. $doctype — Optional. (string) => 'html'
The type of html document. Accepts xhtml or html.. Default html..

Usage

  1. if ( !function_exists( 'language_attributes' ) ) { 
  2. require_once ABSPATH . WPINC . '/general-template.php'; 
  3.  
  4. // Optional. The type of html document. Accepts 'xhtml' or 'html'. Default 'html'. 
  5. $doctype = 'html'; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = language_attributes($doctype); 
  9.  

Defined (1)

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

/wp-includes/general-template.php  
  1. function language_attributes( $doctype = 'html' ) { 
  2. echo get_language_attributes( $doctype );