Changeset 52810
- Timestamp:
- 02/28/2022 04:01:47 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r52809 r52810 372 372 373 373 /** 374 * Search for disabled element tags. Push element to stack on tag open and pop375 * on tag close.374 * Searches for disabled element tags. Pushes element to stack on tag open 375 * and pops on tag close. 376 376 * 377 377 * Assumes first char of $text is tag opening and last char is tag closing. … … 602 602 603 603 /** 604 * Separate HTML elements and comments from the text.604 * Separates HTML elements and comments from the text. 605 605 * 606 606 * @since 4.2.4 … … 614 614 615 615 /** 616 * Retrieve the regular expression for an HTML element.616 * Retrieves the regular expression for an HTML element. 617 617 * 618 618 * @since 4.4.0 … … 670 670 671 671 /** 672 * Retrieve the combined regular expression for HTML and shortcodes.672 * Retrieves the combined regular expression for HTML and shortcodes. 673 673 * 674 674 * @access private … … 677 677 * @since 4.4.0 678 678 * 679 * @param string $shortcode_regex The result from _get_wptexturize_shortcode_regex(). Optional.679 * @param string $shortcode_regex Optional. The result from _get_wptexturize_shortcode_regex(). 680 680 * @return string The regular expression 681 681 */ … … 713 713 714 714 /** 715 * Retrieve the regular expression for shortcodes.715 * Retrieves the regular expression for shortcodes. 716 716 * 717 717 * @access private … … 743 743 744 744 /** 745 * Replace characters or phrases within HTML elements only.745 * Replaces characters or phrases within HTML elements only. 746 746 * 747 747 * @since 4.2.3 … … 794 794 795 795 /** 796 * Newline preservation help function for wpautop 796 * Newline preservation help function for wpautop(). 797 797 * 798 798 * @since 3.1.0 … … 807 807 808 808 /** 809 * Don't auto-p wrap shortcodes that stand alone 809 * Don't auto-p wrap shortcodes that stand alone. 810 810 * 811 811 * Ensures that shortcodes are not wrapped in `<p>...</p>`. … … 1136 1136 1137 1137 /** 1138 * Encode the Unicode values to be used in the URI.1138 * Encodes the Unicode values to be used in the URI. 1139 1139 * 1140 1140 * @since 1.5.0 … … 1935 1935 * German has various locales (de_DE, de_CH, de_AT, ...) with formal and informal variants. 1936 1936 * There is no 3-letter locale like 'def', so checking for 'de' instead of 'de_' is safe, 1937 * since 'de' itself would be a valid locale too ).1937 * since 'de' itself would be a valid locale too. 1938 1938 */ 1939 1939 if ( str_starts_with( $locale, 'de' ) ) { … … 2985 2985 2986 2986 /** 2987 * Convert plaintext URI to HTML links.2987 * Converts plaintext URI to HTML links. 2988 2988 * 2989 2989 * Converts URI, www and ftp, and email addresses. Finishes by fixing links … … 3057 3057 /** 3058 3058 * Breaks a string into chunks by splitting at whitespace characters. 3059 * 3059 3060 * The length of each returned chunk is as close to the specified length goal as possible, 3060 3061 * with the caveat that each chunk includes its trailing delimiter. … … 3346 3347 3347 3348 /** 3348 * Convert one smiley code to the icon graphic file equivalent.3349 * Converts one smiley code to the icon graphic file equivalent. 3349 3350 * 3350 3351 * Callback handler for convert_smilies(). … … 3394 3395 3395 3396 /** 3396 * Convert text equivalent of smilies to images.3397 * Converts text equivalent of smilies to images. 3397 3398 * 3398 3399 * Will only convert smilies if the option 'use_smilies' is true and the global … … 3538 3539 3539 3540 /** 3540 * Convert to ASCII from email subjects.3541 * Converts to ASCII from email subjects. 3541 3542 * 3542 3543 * @since 1.2.0 3543 3544 * 3544 * @param string $string Subject line 3545 * @return string Converted string to ASCII 3545 * @param string $string Subject line. 3546 * @return string Converted string to ASCII. 3546 3547 */ 3547 3548 function wp_iso_descrambler( $string ) { … … 3556 3557 3557 3558 /** 3558 * Helper function to convert hex encoded chars to ASCII 3559 * Helper function to convert hex encoded chars to ASCII. 3559 3560 * 3560 3561 * @since 3.1.0 3561 3562 * @access private 3562 3563 * 3563 * @param array $match The preg_replace_callback matches array 3564 * @return string Converted chars 3564 * @param array $match The preg_replace_callback matches array. 3565 * @return string Converted chars. 3565 3566 */ 3566 3567 function _wp_iso_convert( $match ) { … … 4293 4294 4294 4295 /** 4295 * Perform a deep string replace operation to ensure the values in $search are no longer present4296 * Performs a deep string replace operation to ensure the values in $search are no longer present. 4296 4297 * 4297 4298 * Repeats the replacement operation until it no longer replaces anything so as to remove "nested" values … … 4494 4495 4495 4496 /** 4496 * Convert entities, while preserving already-encoded entities.4497 * Converts entities, while preserving already-encoded entities. 4497 4498 * 4498 4499 * @link https://www.php.net/htmlentities Borrowed from the PHP Manual user notes. … … 4510 4511 4511 4512 /** 4512 * Escape single quotes, htmlspecialchar " < > &, and fixline endings.4513 * Escapes single quotes, htmlspecialchar " < > &, and fixes line endings. 4513 4514 * 4514 4515 * Escapes text strings for echoing in JS. It is intended to be used for inline JS … … 4670 4671 4671 4672 /** 4672 * Escape an HTML tag name.4673 * Escapes an HTML tag name. 4673 4674 * 4674 4675 * @since 2.5.0 … … 4691 4692 4692 4693 /** 4693 * Convert full URL paths to absolute paths.4694 * Converts full URL paths to absolute paths. 4694 4695 * 4695 4696 * Removes the http or https protocols and the domain. Keeps the path '/' at the … … 5038 5039 5039 5040 /** 5040 * Convert lone less than signs.5041 * Converts lone less than signs. 5041 5042 * 5042 5043 * KSES already converts lone greater than signs. … … 5067 5068 5068 5069 /** 5069 * Remove non-allowable HTML from parsed block attribute values when filtering5070 * Removes non-allowable HTML from parsed block attribute values when filtering 5070 5071 * in the post context. 5071 5072 * … … 5169 5170 5170 5171 /** 5171 * Localize list items before the rest of the content.5172 * Localizes list items before the rest of the content. 5172 5173 * 5173 5174 * The '%l' must be at the first characters can then contain the rest of the … … 5268 5269 5269 5270 /** 5270 * Add a Base urlto relative links in passed content.5271 * Adds a base URL to relative links in passed content. 5271 5272 * 5272 5273 * By default it supports the 'src' and 'href' attributes. However this can be … … 5290 5291 5291 5292 /** 5292 * Callback to add a base urlto relative links in passed content.5293 * Callback to add a base URL to relative links in passed content. 5293 5294 * 5294 5295 * @since 2.7.0 … … 5354 5355 5355 5356 /** 5356 * Normalize EOL characters and stripduplicate whitespace.5357 * Normalizes EOL characters and strips duplicate whitespace. 5357 5358 * 5358 5359 * @since 2.7.0 … … 5369 5370 5370 5371 /** 5371 * Properly strip all HTML tags including script and style5372 * Properly strips all HTML tags including script and style 5372 5373 * 5373 5374 * This differs from strip_tags() because it removes the contents of … … 5453 5454 5454 5455 /** 5455 * Internal helper function to sanitize a string from user input or from the d b5456 * Internal helper function to sanitize a string from user input or from the database. 5456 5457 * 5457 5458 * @since 4.7.0 … … 5501 5502 5502 5503 /** 5503 * i18n friendly version of basename()5504 * i18n-friendly version of basename(). 5504 5505 * 5505 5506 * @since 3.1.0 … … 5544 5545 5545 5546 /** 5546 * Sanitize a mime type5547 * Sanitizes a mime type 5547 5548 * 5548 5549 * @since 3.1.3 5549 5550 * 5550 * @param string $mime_type Mime type 5551 * @return string Sanitized mime type 5551 * @param string $mime_type Mime type. 5552 * @return string Sanitized mime type. 5552 5553 */ 5553 5554 function sanitize_mime_type( $mime_type ) { … … 5565 5566 5566 5567 /** 5567 * Sanitize space or carriage return separated URLs that are used to send trackbacks.5568 * Sanitizes space or carriage return separated URLs that are used to send trackbacks. 5568 5569 * 5569 5570 * @since 3.4.0 … … 5635 5636 5636 5637 /** 5637 * Extract and returnthe first URL from passed content.5638 * Extracts and returns the first URL from passed content. 5638 5639 * 5639 5640 * @since 3.6.0 … … 5688 5689 5689 5690 /** 5690 * Print the important emoji-related styles.5691 * Prints the important emoji-related styles. 5691 5692 * 5692 5693 * @since 4.2.0 … … 5721 5722 5722 5723 /** 5723 * Print the inline Emoji detection script if it is not already printed.5724 * Prints the inline Emoji detection script if it is not already printed. 5724 5725 * 5725 5726 * @since 4.2.0 … … 5806 5807 5807 5808 /** 5808 * Convert emoji characters to their equivalent HTML entity.5809 * Converts emoji characters to their equivalent HTML entity. 5809 5810 * 5810 5811 * This allows us to store emoji in a DB using the utf8 character set. … … 5829 5830 5830 5831 /** 5831 * Convert emoji to a static img element.5832 * Converts emoji to a static img element. 5832 5833 * 5833 5834 * @since 4.2.0 … … 5924 5925 5925 5926 /** 5926 * Convert emoji in emails into static images.5927 * Converts emoji in emails into static images. 5927 5928 * 5928 5929 * @since 4.2.0 … … 6018 6019 6019 6020 /** 6020 * Shorten a URL, to be used as link text.6021 * Shortens a URL, to be used as link text. 6021 6022 * 6022 6023 * @since 1.2.0
Note: See TracChangeset
for help on using the changeset viewer.