Make WordPress Core


Ignore:
Timestamp:
09/05/2011 04:53:19 PM (13 years ago)
Author:
nacin
Message:

Use untrailingslashit in url_shorten() and recurse_dirsize(). Remove unnecessary camelCase variables. see #18592.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/misc.php

    r18349 r18637  
    224224    $short_url = str_replace( 'http://', '', stripslashes( $url ));
    225225    $short_url = str_replace( 'www.', '', $short_url );
    226     if ('/' == substr( $short_url, -1 ))
    227         $short_url = substr( $short_url, 0, -1 );
     226    $short_url = untrailingslashit( $short_url );
    228227    if ( strlen( $short_url ) > 35 )
    229         $short_url = substr( $short_url, 0, 32 ).'...';
     228        $short_url = substr( $short_url, 0, 32 ) . '...';
    230229    return $short_url;
    231230}
Note: See TracChangeset for help on using the changeset viewer.