Make WordPress Core

Changeset 59765


Ignore:
Timestamp:
02/05/2025 11:51:28 PM (7 weeks ago)
Author:
SergeyBiryukov
Message:

Docs: Update comments in wp-includes/formatting.php per the documentation standards.

Follow-up to [1345], [8662], [8786], [33624], [34761].

Props kapasias, ankitkumarshah, swissspidy, peterwilsoncc.
Fixes #62885.

File:
1 edited

Legend:

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

    r59515 r59765  
    575575        $text = preg_replace_callback( '/<(script|style|svg|math).*?<\/\\1>/s', '_autop_newline_preservation_helper', $text );
    576576
    577         // Normalize <br>
     577        // Normalize <br>.
    578578        $text = str_replace( array( '<br>', '<br/>' ), '<br />', $text );
    579579
     
    622622 * @since 4.4.0
    623623 *
    624  * @return string The regular expression
     624 * @return string The regular expression.
    625625 */
    626626function get_html_split_regex() {
     
    682682 *
    683683 * @param string $shortcode_regex Optional. The result from _get_wptexturize_shortcode_regex().
    684  * @return string The regular expression
     684 * @return string The regular expression.
    685685 */
    686686function _get_wptexturize_split_regex( $shortcode_regex = '' ) {
     
    724724 *
    725725 * @param string[] $tagnames Array of shortcodes to find.
    726  * @return string The regular expression
     726 * @return string The regular expression.
    727727 */
    728728function _get_wptexturize_shortcode_regex( $tagnames ) {
     
    878878 * @since 1.2.1
    879879 *
    880  * @param string $str The string to be checked
     880 * @param string $str The string to be checked.
    881881 * @return bool True if $str fits a UTF-8 model, false otherwise.
    882882 */
     
    905905        }
    906906
    907         for ( $j = 0; $j < $n; $j++ ) { // n bytes matching 10bbbbbb follow ?
     907        for ( $j = 0; $j < $n; $j++ ) { // n bytes matching 10bbbbbb follow?
    908908            if ( ( ++$i === $length ) || ( ( ord( $str[ $i ] ) & 0xC0 ) !== 0x80 ) ) {
    909909                return false;
     
    11401140 *
    11411141 * @param string $utf8_string             String to encode.
    1142  * @param int    $length                  Max length of the string
     1142 * @param int    $length                  Max length of the string.
    11431143 * @param bool   $encode_ascii_characters Whether to encode ascii characters such as < " '
    11441144 * @return string String with Unicode encoded for URI.
     
    25372537 * @since 0.71
    25382538 *
    2539  * @param string $text  Text to be balanced
     2539 * @param string $text  Text to be balanced.
    25402540 * @param bool   $force If true, forces balancing, ignoring the value of the option. Default false.
    2541  * @return string Balanced text
     2541 * @return string Balanced text.
    25422542 */
    25432543function balanceTags( $text, $force = false ) {  // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
Note: See TracChangeset for help on using the changeset viewer.