diff --git src/wp-includes/formatting.php src/wp-includes/formatting.php
index 92840de..de71956 100644
|
|
|
function wp_staticize_emoji_for_email( $mail ) { |
| 4776 | 4776 | } |
| 4777 | 4777 | |
| 4778 | 4778 | /** |
| 4779 | | * Shorten an URL, to be used as link text |
| | 4779 | * Shorten an URL, to be used as link text. |
| 4780 | 4780 | * |
| 4781 | 4781 | * @since 1.2.0 |
| 4782 | | * @since 4.4.0 Moved to wp-includes/formatting.php from wp-admin/includes/misc.php and added $length param |
| | 4782 | * @since 4.4.0 Moved to wp-includes/formatting.php from wp-admin/includes/misc.php and added $length param. |
| 4783 | 4783 | * |
| 4784 | | * @param string $url URL to shorten |
| 4785 | | * @param int $length Maxiumum length of url to return |
| 4786 | | * @return string |
| 4787 | | */ |
| | 4784 | * @param string $url URL to shorten. |
| | 4785 | * @param int $length Optional. Maximum length of the shortened URL. Default 35 characters. |
| | 4786 | * @return string Shortened URL. |
| | 4787 | */ |
| 4788 | 4788 | function url_shorten( $url, $length = 35 ) { |
| 4789 | 4789 | $stripped = str_replace( array( 'https://', 'http://', 'www.' ), '', $url ); |
| 4790 | 4790 | $short_url = untrailingslashit( $stripped ); |
| … |
… |
function url_shorten( $url, $length = 35 ) { |
| 4793 | 4793 | $short_url = substr( $short_url, 0, $length - 3 ) . '…'; |
| 4794 | 4794 | } |
| 4795 | 4795 | return $short_url; |
| 4796 | | } |
| 4797 | | No newline at end of file |
| | 4796 | } |