Changeset 35815
- Timestamp:
- 12/07/2015 05:05:34 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.4/src/wp-includes/formatting.php
r35709 r35815 4775 4775 4776 4776 /** 4777 * Shorten an URL, to be used as link text 4777 * Shorten an URL, to be used as link text. 4778 4778 * 4779 4779 * @since 1.2.0 4780 * @since 4.4.0 Moved to wp-includes/formatting.php from wp-admin/includes/misc.php and added $length param 4781 * 4782 * @param string $url URL to shorten4783 * @param int $length Maxiumum length of url to return4784 * @return string 4785 */4780 * @since 4.4.0 Moved to wp-includes/formatting.php from wp-admin/includes/misc.php and added $length param. 4781 * 4782 * @param string $url URL to shorten. 4783 * @param int $length Optional. Maximum length of the shortened URL. Default 35 characters. 4784 * @return string Shortened URL. 4785 */ 4786 4786 function url_shorten( $url, $length = 35 ) { 4787 4787 $stripped = str_replace( array( 'https://', 'http://', 'www.' ), '', $url );
Note: See TracChangeset
for help on using the changeset viewer.