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
if ( !function_exists( 'language_attributes' ) ) { require_once ABSPATH . WPINC . '/general-template.php'; } // Optional. The type of html document. Accepts 'xhtml' or 'html'. Default 'html'. $doctype = 'html'; // NOTICE! Understand what this does before running. $result = language_attributes($doctype);
Defined (1)
The function is defined in the following location(s).
- /wp-includes/general-template.php
- function language_attributes( $doctype = 'html' ) {
- echo get_language_attributes( $doctype );
- }