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

git-svn-id: https://develop.svn.wordpress.org/trunk@18637 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2011-09-05 16:53:19 +00:00
parent a967718ed3
commit 78b5130751
2 changed files with 5 additions and 9 deletions
+2 -3
View File
@@ -223,10 +223,9 @@ add_action( 'update_option_siteurl', 'update_home_siteurl', 10, 2 );
function url_shorten( $url ) {
$short_url = str_replace( 'http://', '', stripslashes( $url ));
$short_url = str_replace( 'www.', '', $short_url );
if ('/' == substr( $short_url, -1 ))
$short_url = substr( $short_url, 0, -1 );
$short_url = untrailingslashit( $short_url );
if ( strlen( $short_url ) > 35 )
$short_url = substr( $short_url, 0, 32 ).'...';
$short_url = substr( $short_url, 0, 32 ) . '...';
return $short_url;
}