Docs: Replace "html" and "xhtml" instances in DocBlocks and comments with "HTML" and "XHTML".

This ensures consistent capitalization where appropriate.

Props navidos, desrosj.
Fixes #50473.

git-svn-id: https://develop.svn.wordpress.org/trunk@48199 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2020-06-28 14:00:26 +00:00
parent 8672d08404
commit bb2aad471b
12 changed files with 150 additions and 128 deletions

View File

@@ -3915,7 +3915,7 @@ function wp_get_code_editor_settings( $args ) {
* Retrieves the contents of the search WordPress query variable.
*
* The search query string is passed through esc_attr() to ensure that it is safe
* for placing in an html attribute.
* for placing in an HTML attribute.
*
* @since 2.3.0
*
@@ -3943,7 +3943,7 @@ function get_search_query( $escaped = true ) {
* Displays the contents of the search query variable.
*
* The search query string is passed through esc_attr() to ensure that it is safe
* for placing in an html attribute.
* for placing in an HTML attribute.
*
* @since 2.1.0
*/
@@ -3959,14 +3959,14 @@ function the_search_query() {
}
/**
* Gets the language attributes for the html tag.
* Gets the language attributes for the 'html' tag.
*
* Builds up a set of html attributes containing the text direction and language
* Builds up a set of HTML attributes containing the text direction and language
* information for the page.
*
* @since 4.3.0
*
* @param string $doctype Optional. The type of html document. Accepts 'xhtml' or 'html'. Default 'html'.
* @param string $doctype Optional. The type of HTML document. Accepts 'xhtml' or 'html'. Default 'html'.
*/
function get_language_attributes( $doctype = 'html' ) {
$attributes = array();
@@ -3989,27 +3989,27 @@ function get_language_attributes( $doctype = 'html' ) {
$output = implode( ' ', $attributes );
/**
* Filters the language attributes for display in the html tag.
* Filters 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).
* @param string $doctype The type of HTML document (xhtml|html).
*/
return apply_filters( 'language_attributes', $output, $doctype );
}
/**
* Displays the language attributes for the html tag.
* Displays the language attributes for the 'html' tag.
*
* Builds up a set of html attributes containing the text direction and language
* 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 Converted into a wrapper for get_language_attributes().
*
* @param string $doctype Optional. The type of html document. Accepts 'xhtml' or 'html'. Default 'html'.
* @param string $doctype Optional. The type of HTML document. Accepts 'xhtml' or 'html'. Default 'html'.
*/
function language_attributes( $doctype = 'html' ) {
echo get_language_attributes( $doctype );
@@ -4654,7 +4654,7 @@ function get_the_generator( $type = '' ) {
}
/**
* Outputs the html checked attribute.
* Outputs the HTML checked attribute.
*
* Compares the first two arguments and if identical marks as checked
*
@@ -4663,14 +4663,14 @@ function get_the_generator( $type = '' ) {
* @param mixed $checked One of the values to compare
* @param mixed $current (true) The other value to compare if not just true
* @param bool $echo Whether to echo or just return the string
* @return string html attribute or empty string
* @return string HTML attribute or empty string
*/
function checked( $checked, $current = true, $echo = true ) {
return __checked_selected_helper( $checked, $current, $echo, 'checked' );
}
/**
* Outputs the html selected attribute.
* Outputs the HTML selected attribute.
*
* Compares the first two arguments and if identical marks as selected
*
@@ -4679,14 +4679,14 @@ function checked( $checked, $current = true, $echo = true ) {
* @param mixed $selected One of the values to compare
* @param mixed $current (true) The other value to compare if not just true
* @param bool $echo Whether to echo or just return the string
* @return string html attribute or empty string
* @return string HTML attribute or empty string
*/
function selected( $selected, $current = true, $echo = true ) {
return __checked_selected_helper( $selected, $current, $echo, 'selected' );
}
/**
* Outputs the html disabled attribute.
* Outputs the HTML disabled attribute.
*
* Compares the first two arguments and if identical marks as disabled
*
@@ -4695,14 +4695,14 @@ function selected( $selected, $current = true, $echo = true ) {
* @param mixed $disabled One of the values to compare
* @param mixed $current (true) The other value to compare if not just true
* @param bool $echo Whether to echo or just return the string
* @return string html attribute or empty string
* @return string HTML attribute or empty string
*/
function disabled( $disabled, $current = true, $echo = true ) {
return __checked_selected_helper( $disabled, $current, $echo, 'disabled' );
}
/**
* Outputs the html readonly attribute.
* Outputs the HTML readonly attribute.
*
* Compares the first two arguments and if identical marks as readonly
*
@@ -4711,7 +4711,7 @@ function disabled( $disabled, $current = true, $echo = true ) {
* @param mixed $readonly One of the values to compare
* @param mixed $current (true) The other value to compare if not just true
* @param bool $echo Whether to echo or just return the string
* @return string html attribute or empty string
* @return string HTML attribute or empty string
*/
function readonly( $readonly, $current = true, $echo = true ) {
return __checked_selected_helper( $readonly, $current, $echo, 'readonly' );
@@ -4729,7 +4729,7 @@ function readonly( $readonly, $current = true, $echo = true ) {
* @param mixed $current (true) The other value to compare if not just true
* @param bool $echo Whether to echo or just return the string
* @param string $type The type of checked|selected|disabled|readonly we are doing
* @return string html attribute or empty string
* @return string HTML attribute or empty string
*/
function __checked_selected_helper( $helper, $current, $echo, $type ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore
if ( (string) $helper === (string) $current ) {