Make WordPress Core


Ignore:
Timestamp:
04/02/2022 01:53:06 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Docs: Further remove HTML markup from various function summaries.

Per the ​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 ​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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/formatting.php

    r52821 r53053  
    375375 * and pops on tag close.
    376376 *
    377  * Assumes first char of $text is tag opening and last char is tag closing.
    378  * Assumes second char of $text is optionally '/' to indicate closing as in </html>.
     377 * Assumes first char of `$text` is tag opening and last char is tag closing.
     378 * Assumes second char of `$text` is optionally `/` to indicate closing as in `</html>`.
    379379 *
    380380 * @since 2.9.0
    … …  
    430430 * A group of regex replaces used to identify text formatted with newlines and
    431431 * replace double line breaks with HTML paragraph tags. The remaining line breaks
    432  * after conversion become <<br />> tags, unless $br is set to '0' or 'false'.
     432 * after conversion become `<br />` tags, unless `$br` is set to '0' or 'false'.
    433433 *
    434434 * @since 0.71
    … …  
    910910 * Converts a number of special characters into their HTML entities.
    911911 *
    912  * Specifically deals with: &, <, >, ", and '.
    913  *
    914  * $quote_style can be set to ENT_COMPAT to encode " to
    915  * &quot;, or ENT_QUOTES to do both. Default is ENT_NOQUOTES where no quotes are encoded.
     912 * Specifically deals with: `&`, `<`, `>`, `"`, and `'`.
     913 *
     914 * `$quote_style` can be set to ENT_COMPAT to encode `"` to
     915 * `&quot;`, or ENT_QUOTES to do both. Default is ENT_NOQUOTES where no quotes are encoded.
    916916 *
    917917 * @since 1.2.2
    … …  
    995995 * Converts a number of HTML entities into their special characters.
    996996 *
    997  * Specifically deals with: &, <, >, ", and '.
    998  *
    999  * $quote_style can be set to ENT_COMPAT to decode " entities,
    1000  * or ENT_QUOTES to do both " and '. Default is ENT_NOQUOTES where no quotes are decoded.
     997 * Specifically deals with: `&`, `<`, `>`, `"`, and `'`.
     998 *
     999 * `$quote_style` can be set to ENT_COMPAT to decode `"` entities,
     1000 * or ENT_QUOTES to do both `"` and `'`. Default is ENT_NOQUOTES where no quotes are decoded.
    10011001 *
    10021002 * @since 2.8.0
    … …  
    45114511
    45124512/**
    4513  * Escapes single quotes, htmlspecialchar " < > &, and fixes line endings.
     4513 * Escapes single quotes, `"`, `<`, `>`, `&`, and fixes line endings.
    45144514 *
    45154515 * Escapes text strings for echoing in JS. It is intended to be used for inline JS
    4516  * (in a tag attribute, for example onclick="..."). Note that the strings have to
     4516 * (in a tag attribute, for example `onclick="..."`). Note that the strings have to
    45174517 * be in single quotes. The {@see 'js_escape'} filter is also applied here.
    45184518 *
Note: See TracChangeset for help on using the changeset viewer.