Make WordPress Core

Ticket #20166: typo2.diff

File typo2.diff, 1.2 KB (added by swissspidy, 10 years ago)
  • src/wp-includes/formatting.php

    diff --git src/wp-includes/formatting.php src/wp-includes/formatting.php
    index 92840de..de71956 100644
    function wp_staticize_emoji_for_email( $mail ) { 
    47764776}
    47774777
    47784778/**
    4779  * Shorten an URL, to be used as link text
     4779 * Shorten an URL, to be used as link text.
    47804780 *
    47814781 * @since 1.2.0
    4782  * @since 4.4.0 Moved to wp-includes/formatting.php from wp-admin/includes/misc.php and added $length param
     4782 * @since 4.4.0 Moved to wp-includes/formatting.php from wp-admin/includes/misc.php and added $length param.
    47834783 *
    4784  * @param string $url URL to shorten
    4785  * @param  int $length Maxiumum length of url to return
    4786  * @return string
    4787 */
     4784 * @param string $url    URL to shorten.
     4785 * @param int    $length Optional. Maximum length of the shortened URL. Default 35 characters.
     4786 * @return string Shortened URL.
     4787 */
    47884788function url_shorten( $url, $length = 35 ) {
    47894789        $stripped = str_replace( array( 'https://', 'http://', 'www.' ), '', $url );
    47904790        $short_url = untrailingslashit( $stripped );
    function url_shorten( $url, $length = 35 ) { 
    47934793                $short_url = substr( $short_url, 0, $length - 3 ) . '…';
    47944794        }
    47954795        return $short_url;
    4796 }
    4797  No newline at end of file
     4796}