Created
July 8, 2014 16:24
-
-
Save modemlooper/f6331ba7f93d6de0f165 to your computer and use it in GitHub Desktop.
ellipsisize a url
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function wds_google_url( $url ){ | |
$parsed_url = parse_url( $url ); | |
$url = explode( '/', $parsed_url ); | |
return $parsed_url['scheme'] . '://' . $parsed_url['host'] . '.../' . end( $url ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment