diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 1945c6738f..65585fbf9c 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -2527,16 +2527,16 @@ function the_search_query() { } /** - * Display the language attributes for the html tag. + * Get the language attributes for the html tag. * * Builds up a set of html attributes containing the text direction and language * information for the page. * - * @since 2.1.0 + * @since 4.3.0 * - * @param string $doctype The type of html document (xhtml|html). + * @param string $doctype Optional. The type of html document (xhtml|html). Default html. */ -function language_attributes($doctype = 'html') { +function get_language_attributes( $doctype = 'html' ) { $attributes = array(); if ( function_exists( 'is_rtl' ) && is_rtl() ) @@ -2556,10 +2556,26 @@ function language_attributes($doctype = 'html') { * Filter the language attributes for display in the html tag. * * @since 2.5.0 + * @since 4.3.0 Added the `$doctype` parameter. * * @param string $output A space-separated list of language attributes. + * @param string $doctype The type of html document (xhtml|html). */ - echo apply_filters( 'language_attributes', $output ); + return apply_filters( 'language_attributes', $output, $doctype ); +} + +/** + * Display the language attributes for the html tag. + * + * Builds up a set of html attributes containing the text direction and language + * information for the page. + * + * @since 2.1.0 + * + * @param string $doctype Optional. The type of html document (xhtml|html). Default html. + */ +function language_attributes( $doctype = 'html' ) { + echo get_language_attributes( $doctype ); } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index b69b8435b0..9a3d972d6c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.3-alpha-32867'; +$wp_version = '4.3-alpha-32868'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.