Make WordPress Core

Changeset 31249


Ignore:
Timestamp:
01/20/2015 06:43:30 PM (10 years ago)
Author:
pento
Message:

Texturize: Add "em" as a cockney term, so that "'em" is texturized with an apostrophe, instead of an open quote.

Fixes #29813.

Props miqrogroove.

Location:
trunk
Files:
2 edited

Legend:

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

    r31199 r31249  
    8787        // if a plugin has provided an autocorrect array, use it
    8888        if ( isset($wp_cockneyreplace) ) {
    89             $cockney = array_keys($wp_cockneyreplace);
    90             $cockneyreplace = array_values($wp_cockneyreplace);
     89            $cockney = array_keys( $wp_cockneyreplace );
     90            $cockneyreplace = array_values( $wp_cockneyreplace );
    9191        } elseif ( "'" != $apos ) { // Only bother if we're doing a replacement.
    92             $cockney = array( "'tain't", "'twere", "'twas", "'tis", "'twill", "'til", "'bout", "'nuff", "'round", "'cause" );
    93             $cockneyreplace = array( $apos . "tain" . $apos . "t", $apos . "twere", $apos . "twas", $apos . "tis", $apos . "twill", $apos . "til", $apos . "bout", $apos . "nuff", $apos . "round", $apos . "cause" );
     92            $cockney = array( "'tain't", "'twere", "'twas", "'tis", "'twill", "'til", "'bout", "'nuff", "'round", "'cause", "'em" );
     93            $cockneyreplace = array( $apos . "tain" . $apos . "t", $apos . "twere", $apos . "twas", $apos . "tis", $apos . "twill", $apos . "til", $apos . "bout", $apos . "nuff", $apos . "round", $apos . "cause", $apos . "em" );
    9494        } else {
    9595            $cockney = $cockneyreplace = array();
  • trunk/tests/phpunit/tests/formatting/WPTexturize.php

    r31199 r31249  
    961961            array(
    962962                "word 'em word",
    963                 "word ‘em word",
     963                "word ’em word",
    964964            ),
    965965        );
Note: See TracChangeset for help on using the changeset viewer.