Docs: After [35314], fix the DocBlock for url_shorten().

See #20166.
Built from https://develop.svn.wordpress.org/trunk@35813


git-svn-id: http://core.svn.wordpress.org/trunk@35777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Pascal Birchler 2015-12-07 16:39:25 +00:00
parent ef223adbdb
commit 331fdaf184
2 changed files with 8 additions and 8 deletions

View File

@ -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 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 string $url URL to shorten.
* @param int $length Maxiumum length of url to return * @param int $length Optional. Maximum length of the shortened URL. Default 35 characters.
* @return string * @return string Shortened URL.
*/ */
function url_shorten( $url, $length = 35 ) { function url_shorten( $url, $length = 35 ) {
$stripped = str_replace( array( 'https://', 'http://', 'www.' ), '', $url ); $stripped = str_replace( array( 'https://', 'http://', 'www.' ), '', $url );
$short_url = untrailingslashit( $stripped ); $short_url = untrailingslashit( $stripped );
@ -4793,4 +4793,4 @@ function url_shorten( $url, $length = 35 ) {
$short_url = substr( $short_url, 0, $length - 3 ) . '…'; $short_url = substr( $short_url, 0, $length - 3 ) . '…';
} }
return $short_url; return $short_url;
} }

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.5-alpha-35812'; $wp_version = '4.5-alpha-35813';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.