Core Function
View Source on Trac ↗ url_shorten()
url_shorten( mixed $url, mixed $length = 35 ) Shortens a URL, to be used as link text.
Parameters 1 required
| Name / Type | Description |
|---|---|
| $url string | URL to shorten. Required |
| $length int | Optional. Maximum length of the shortened URL. Default 35 characters. |
Return Value
(string)
Shortened URL.
Function Information
Since Version
1.2.0
Source File
wp-includes/formatting.php
Advertisement