From 4868527c04eecdd6120599ad928de8b489f90370 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Mon, 7 Dec 2015 16:38:24 +0000 Subject: [PATCH] Docs: After [35314], fix the DocBlock for `url_shorten()`. See #20166. git-svn-id: https://develop.svn.wordpress.org/trunk@35813 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/formatting.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php index 92840de13d..de7195682f 100644 --- a/src/wp-includes/formatting.php +++ b/src/wp-includes/formatting.php @@ -4776,15 +4776,15 @@ function wp_staticize_emoji_for_email( $mail ) { } /** - * Shorten an URL, to be used as link text + * Shorten an URL, to be used as link text. * * @since 1.2.0 - * @since 4.4.0 Moved to wp-includes/formatting.php from wp-admin/includes/misc.php and added $length param + * @since 4.4.0 Moved to wp-includes/formatting.php from wp-admin/includes/misc.php and added $length param. * - * @param string $url URL to shorten - * @param int $length Maxiumum length of url to return - * @return string -*/ + * @param string $url URL to shorten. + * @param int $length Optional. Maximum length of the shortened URL. Default 35 characters. + * @return string Shortened URL. + */ function url_shorten( $url, $length = 35 ) { $stripped = str_replace( array( 'https://', 'http://', 'www.' ), '', $url ); $short_url = untrailingslashit( $stripped ); @@ -4793,4 +4793,4 @@ function url_shorten( $url, $length = 35 ) { $short_url = substr( $short_url, 0, $length - 3 ) . '…'; } return $short_url; -} \ No newline at end of file +}