WordPress.org

Make WordPress Core

Changeset 46592


Ignore:
Timestamp:
10/26/2019 12:56:50 AM (17 months ago)
Author:
SergeyBiryukov
Message:

Docs: Improve documentation for wptexturize().

Props atachibana.
Fixes #48397.

File:
1 edited

Legend:

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

    r46564 r46592  
    99
    1010/**
    11  * Replaces common plain text characters into formatted entities
     11 * Replaces common plain text characters with formatted entities.
     12 *
     13 * Returns given text with transformations of quotes into smart quotes, apostrophes,
     14 * dashes, ellipses, the trademark symbol, and the multiplication symbol.
    1215 *
    1316 * As an example,
     
    1922 *     ’cause today’s effort makes it worth tomorrow’s “holiday” …
    2023 *
    21  * Code within certain html blocks are skipped.
     24 * Code within certain HTML blocks are skipped.
    2225 *
    2326 * Do not use this function before the {@see 'init'} action hook; everything will break.
     
    2528 * @since 0.71
    2629 *
    27  * @global array $wp_cockneyreplace Array of formatted entities for certain common phrases
     30 * @global array $wp_cockneyreplace Array of formatted entities for certain common phrases.
    2831 * @global array $shortcode_tags
    2932 * @staticvar array  $static_characters
     
    4548 * @staticvar string $apos_flag
    4649 *
    47  * @param string $text The text to be formatted
     50 * @param string $text  The text to be formatted.
    4851 * @param bool   $reset Set to true for unit testing. Translated patterns will reset.
    49  * @return string The string replaced with html entities
     52 * @return string The string replaced with HTML entities.
    5053 */
    5154function wptexturize( $text, $reset = false ) {
Note: See TracChangeset for help on using the changeset viewer.