[ Web Proxy ]
URL:
Viewing: https://developer.wordpress.org/reference/functions/language_attributes/#comment-652 [Back]  [Original]

language_attributes() Function | Developer.WordPress.org Skip to content
WordPress.org

language_attributes( string $doctype = 'html' )

Displays the language attributes for the ‘html’ tag.

Description

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

Parameters

$doctypestringoptional
The type of HTML document. Accepts 'xhtml' or 'html'. Default 'html'.

Default:'html'

Source

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

Gets the language attributes for the ‘html’ tag.

Used byDescription
wp_options_connectors_render_page()wp-includes/build/pages/options-connectors/page.php

Render the options-connectors page.

wp_font_library_render_page()wp-includes/build/pages/font-library/page.php

Render the font-library page.

WP_REST_Widget_Types_Controller::render_legacy_widget_preview_iframe()wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php

Renders a page containing a preview of the requested Legacy Widget block.

login_header()wp-login.php

Outputs the login page header.

display_header()wp-admin/install.php

Display installation header.

_wp_admin_html_begin()wp-admin/includes/template.php

Prints out the beginning of the admin HTML header.

Show 1 moreShow less

Changelog

VersionDescription
4.3.0Converted into a wrapper for get_language_attributes() .
2.1.0Introduced.

User Contributed Notes

  1. Skip to note 2 content

    Example

    <!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    ...

    (from wp-content/themes/twentyten/header.php)

    Log in to add feedback

You must log in before being able to contribute a note or feedback.


Web Proxy Viewer  |  New URL  |  Original Page