Docs: Further remove HTML markup from various function summaries.

Per the [https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#summary-formerly-short-description WordPress PHP documentation standards], no HTML markup or Markdown of any kind should be used in the summary. This ensures that the summary is displayed correctly in the [https://developer.wordpress.org/reference/ WordPress Code Reference].

This commit also improves formatting of HTML special characters in descriptions in `wp-includes/formatting.php`.

Follow-up to [53048].

Props johnbillion, mukesh27.
Fixes #55506.
Built from https://develop.svn.wordpress.org/trunk@53053


git-svn-id: http://core.svn.wordpress.org/trunk@52642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2022-04-02 13:55:11 +00:00
parent 58fd134d63
commit 521db02647
6 changed files with 17 additions and 17 deletions

View File

@ -328,7 +328,7 @@ function wp_oembed_register_route() {
} }
/** /**
* Adds oEmbed discovery links in the website <head>. * Adds oEmbed discovery links in the head element of the website.
* *
* @since 4.4.0 * @since 4.4.0
*/ */

View File

@ -374,8 +374,8 @@ function wptexturize_primes( $haystack, $needle, $prime, $open_quote, $close_quo
* Searches for disabled element tags. Pushes element to stack on tag open * Searches for disabled element tags. Pushes element to stack on tag open
* and pops on tag close. * and pops on tag close.
* *
* Assumes first char of $text is tag opening and last char is tag closing. * Assumes first char of `$text` is tag opening and last char is tag closing.
* Assumes second char of $text is optionally '/' to indicate closing as in </html>. * Assumes second char of `$text` is optionally `/` to indicate closing as in `</html>`.
* *
* @since 2.9.0 * @since 2.9.0
* @access private * @access private
@ -429,7 +429,7 @@ function _wptexturize_pushpop_element( $text, &$stack, $disabled_elements ) {
* *
* A group of regex replaces used to identify text formatted with newlines and * A group of regex replaces used to identify text formatted with newlines and
* replace double line breaks with HTML paragraph tags. The remaining line breaks * replace double line breaks with HTML paragraph tags. The remaining line breaks
* after conversion become <<br />> tags, unless $br is set to '0' or 'false'. * after conversion become `<br />` tags, unless `$br` is set to '0' or 'false'.
* *
* @since 0.71 * @since 0.71
* *
@ -909,10 +909,10 @@ function seems_utf8( $str ) {
/** /**
* Converts a number of special characters into their HTML entities. * Converts a number of special characters into their HTML entities.
* *
* Specifically deals with: &, <, >, ", and '. * Specifically deals with: `&`, `<`, `>`, `"`, and `'`.
* *
* $quote_style can be set to ENT_COMPAT to encode " to * `$quote_style` can be set to ENT_COMPAT to encode `"` to
* &quot;, or ENT_QUOTES to do both. Default is ENT_NOQUOTES where no quotes are encoded. * `&quot;`, or ENT_QUOTES to do both. Default is ENT_NOQUOTES where no quotes are encoded.
* *
* @since 1.2.2 * @since 1.2.2
* @since 5.5.0 `$quote_style` also accepts `ENT_XML1`. * @since 5.5.0 `$quote_style` also accepts `ENT_XML1`.
@ -994,10 +994,10 @@ function _wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = fals
/** /**
* Converts a number of HTML entities into their special characters. * Converts a number of HTML entities into their special characters.
* *
* Specifically deals with: &, <, >, ", and '. * Specifically deals with: `&`, `<`, `>`, `"`, and `'`.
* *
* $quote_style can be set to ENT_COMPAT to decode " entities, * `$quote_style` can be set to ENT_COMPAT to decode `"` entities,
* or ENT_QUOTES to do both " and '. Default is ENT_NOQUOTES where no quotes are decoded. * or ENT_QUOTES to do both `"` and `'`. Default is ENT_NOQUOTES where no quotes are decoded.
* *
* @since 2.8.0 * @since 2.8.0
* *
@ -4510,10 +4510,10 @@ function htmlentities2( $myHTML ) {
} }
/** /**
* Escapes single quotes, htmlspecialchar " < > &, and fixes line endings. * Escapes single quotes, `"`, `<`, `>`, `&`, and fixes line endings.
* *
* Escapes text strings for echoing in JS. It is intended to be used for inline JS * Escapes text strings for echoing in JS. It is intended to be used for inline JS
* (in a tag attribute, for example onclick="..."). Note that the strings have to * (in a tag attribute, for example `onclick="..."`). Note that the strings have to
* be in single quotes. The {@see 'js_escape'} filter is also applied here. * be in single quotes. The {@see 'js_escape'} filter is also applied here.
* *
* @since 2.8.0 * @since 2.8.0

View File

@ -166,7 +166,7 @@ function wp_add_inline_script( $handle, $data, $position = 'after' ) {
* as a query string for cache busting purposes. If version is set to false, a version * as a query string for cache busting purposes. If version is set to false, a version
* number is automatically added equal to current installed WordPress version. * number is automatically added equal to current installed WordPress version.
* If set to null, no version is added. * If set to null, no version is added.
* @param bool $in_footer Optional. Whether to enqueue the script before </body> instead of in the <head>. * @param bool $in_footer Optional. Whether to enqueue the script before `</body>` instead of in the `<head>`.
* Default 'false'. * Default 'false'.
* @return bool Whether the script has been registered. True on success, false on failure. * @return bool Whether the script has been registered. True on success, false on failure.
*/ */
@ -340,7 +340,7 @@ function wp_deregister_script( $handle ) {
* as a query string for cache busting purposes. If version is set to false, a version * as a query string for cache busting purposes. If version is set to false, a version
* number is automatically added equal to current installed WordPress version. * number is automatically added equal to current installed WordPress version.
* If set to null, no version is added. * If set to null, no version is added.
* @param bool $in_footer Optional. Whether to enqueue the script before </body> instead of in the <head>. * @param bool $in_footer Optional. Whether to enqueue the script before `</body>` instead of in the `<head>`.
* Default 'false'. * Default 'false'.
*/ */
function wp_enqueue_script( $handle, $src = '', $deps = array(), $ver = false, $in_footer = false ) { function wp_enqueue_script( $handle, $src = '', $deps = array(), $ver = false, $in_footer = false ) {

View File

@ -482,7 +482,7 @@ class WP_REST_URL_Details_Controller extends WP_REST_Controller {
} }
/** /**
* Retrieves the head tag section. * Retrieves the head element section.
* *
* @since 5.9.0 * @since 5.9.0
* *

View File

@ -1948,7 +1948,7 @@ function wp_get_custom_css( $stylesheet = '' ) {
} }
/** /**
* Filters the Custom CSS Output into the <head>. * Filters the custom CSS output into the head element.
* *
* @since 4.7.0 * @since 4.7.0
* *

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.0-alpha-53052'; $wp_version = '6.0-alpha-53053';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.